Skip to content

Commit d9abea9

Browse files
committed
laravel 11 update
1 parent 79d90af commit d9abea9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+53367
-1793
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: [3x1io]

.github/workflows/ci.yaml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: TomatoPHP CI/CD
2+
on:
3+
pull_request:
4+
branches:
5+
- master
6+
- develop
7+
push:
8+
branches:
9+
- master
10+
- develop
11+
jobs:
12+
laravel:
13+
name: Laravel (PHP ${{ matrix.php-versions }})
14+
runs-on: ubuntu-latest
15+
env:
16+
DB_DATABASE: laravel
17+
DB_USERNAME: root
18+
DB_PASSWORD: password
19+
services:
20+
mysql:
21+
image: mysql:latest
22+
env:
23+
MYSQL_ALLOW_EMPTY_PASSWORD: false
24+
MYSQL_ROOT_PASSWORD: password
25+
MYSQL_DATABASE: laravel
26+
ports:
27+
- 3306/tcp
28+
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
29+
30+
redis:
31+
image: redis
32+
ports:
33+
- 6379/tcp
34+
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
35+
strategy:
36+
fail-fast: false
37+
matrix:
38+
php-versions: ['8.2']
39+
steps:
40+
- name: Checkout
41+
uses: actions/checkout@v4
42+
43+
- name: Setup PHP
44+
uses: shivammathur/setup-php@v2
45+
with:
46+
php-version: ${{ matrix.php-versions }}
47+
extensions: sqlite, pdo_sqlite, pcntl, zip, intl, exif, mbstring, dom, fileinfo, mysql
48+
coverage: xdebug
49+
50+
- name: Copy .env Before Install Composer
51+
run: php -r "file_exists('.env') || copy('.env.example', '.env'); echo file_get_contents('.env');"
52+
53+
- name: Start MySQL Service
54+
run: sudo /etc/init.d/mysql start
55+
56+
- name: Get composer cache directory
57+
id: composer-cache
58+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
59+
60+
- name: Cache composer dependencies
61+
uses: actions/cache@v3
62+
with:
63+
path: ${{ steps.composer-cache.outputs.dir }}
64+
# Use composer.json for key, if composer.lock is not committed.
65+
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
66+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
67+
restore-keys: ${{ runner.os }}-composer-
68+
69+
- name: Install Composer dependencies
70+
run: composer install --no-progress --prefer-dist --optimize-autoloader
71+
72+
- name: Generate Applications Key
73+
run: php artisan key:generate
74+
75+
- name: Clear Config
76+
run: php artisan config:clear
77+
78+
- name: Run Migration
79+
run: php artisan migrate -v
80+
env:
81+
DB_PORT: ${{ job.services.mysql.ports['3306'] }}
82+
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
83+
84+
- name: Run NPM Install
85+
run: npm install
86+
87+
- name: Run NPM Run Build
88+
run: npm run build

.scripts/deploy.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
set -e
3+
4+
echo "Deployment started ..."
5+
6+
# Pull the latest version of the app
7+
git reset --hard
8+
git pull origin master
9+
10+
# Install composer dependencies
11+
composer install
12+
13+
# Clear the old cache
14+
php8.2 artisan clear-compiled
15+
16+
# Recreate cache
17+
php8.2 artisan optimize
18+
19+
20+
# Run database migrations
21+
php8.2 artisan migrate --force
22+
23+
24+
echo "Deployment finished!"

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) Fady Mondy
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

Modules/.gitkeep

Whitespace-only changes.

README.md

Lines changed: 16 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,31 @@
1-
<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg" width="400" alt="Laravel Logo"></a></p>
1+
![Screenshot](https://github.com/tomatophp/tomato/blob/master/art/screenshot.png)
22

3-
<p align="center">
4-
<a href="https://github.com/laravel/framework/actions"><img src="https://github.com/laravel/framework/workflows/tests/badge.svg" alt="Build Status"></a>
5-
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/dt/laravel/framework" alt="Total Downloads"></a>
6-
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/v/laravel/framework" alt="Latest Stable Version"></a>
7-
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/l/laravel/framework" alt="License"></a>
8-
</p>
3+
# Tomato Framework
94

10-
## About Laravel
5+
🍅 TomatoPHP is built to make it easy to develop web apps and API by generating files of CRUD operations and support helpers of tonnes of functions to make it easy to manage and use framework services.
116

12-
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:
7+
## Installation
138

14-
- [Simple, fast routing engine](https://laravel.com/docs/routing).
15-
- [Powerful dependency injection container](https://laravel.com/docs/container).
16-
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage.
17-
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent).
18-
- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
19-
- [Robust background job processing](https://laravel.com/docs/queues).
20-
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).
9+
```bash
10+
composer create-project tomatophp/tomato
11+
```
2112

22-
Laravel is accessible, powerful, and provides tools required for large, robust applications.
13+
## Support
2314

24-
## Learning Laravel
15+
you can join our discord server to get support [TomatoPHP](https://discord.gg/Xqmt35Uh)
2516

26-
Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
17+
## Docs
2718

28-
You may also try the [Laravel Bootcamp](https://bootcamp.laravel.com), where you will be guided through building a modern Laravel application from scratch.
19+
you can check docs of this package on [Docs](https://docs.tomatophp.com)
2920

30-
If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains thousands of video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
21+
## Changelog
3122

32-
## Laravel Sponsors
23+
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
3324

34-
We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the [Laravel Partners program](https://partners.laravel.com).
25+
## Credits
3526

36-
### Premium Partners
37-
38-
- **[Vehikl](https://vehikl.com/)**
39-
- **[Tighten Co.](https://tighten.co)**
40-
- **[WebReinvent](https://webreinvent.com/)**
41-
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
42-
- **[64 Robots](https://64robots.com)**
43-
- **[Curotec](https://www.curotec.com/services/technologies/laravel/)**
44-
- **[Cyber-Duck](https://cyber-duck.co.uk)**
45-
- **[DevSquad](https://devsquad.com/hire-laravel-developers)**
46-
- **[Jump24](https://jump24.co.uk)**
47-
- **[Redberry](https://redberry.international/laravel/)**
48-
- **[Active Logic](https://activelogic.com)**
49-
- **[byte5](https://byte5.de)**
50-
- **[OP.GG](https://op.gg)**
51-
52-
## Contributing
53-
54-
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).
55-
56-
## Code of Conduct
57-
58-
In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).
59-
60-
## Security Vulnerabilities
61-
62-
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [[email protected]](mailto:[email protected]). All security vulnerabilities will be promptly addressed.
27+
- [Fady Mondy](https://github.com/3x1io)
6328

6429
## License
6530

66-
The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
31+
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

SECURITY.md

Whitespace-only changes.

app/Models/User.php

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,21 @@
22

33
namespace App\Models;
44

5-
// use Illuminate\Contracts\Auth\MustVerifyEmail;
5+
use Illuminate\Contracts\Auth\MustVerifyEmail;
66
use Illuminate\Database\Eloquent\Factories\HasFactory;
77
use Illuminate\Foundation\Auth\User as Authenticatable;
88
use Illuminate\Notifications\Notifiable;
9+
use Laravel\Fortify\TwoFactorAuthenticatable;
10+
use Laravel\Jetstream\HasProfilePhoto;
11+
use Laravel\Jetstream\HasTeams;
12+
use Laravel\Sanctum\HasApiTokens;
913

10-
class User extends Authenticatable
14+
class User extends Authenticatable
1115
{
12-
use HasFactory, Notifiable;
16+
use HasApiTokens, HasFactory, Notifiable;
17+
use HasTeams;
18+
use HasProfilePhoto;
19+
use TwoFactorAuthenticatable;
1320

1421
/**
1522
* The attributes that are mass assignable.
@@ -33,15 +40,12 @@ class User extends Authenticatable
3340
];
3441

3542
/**
36-
* Get the attributes that should be cast.
43+
* The attributes that should be cast.
3744
*
38-
* @return array<string, string>
45+
* @var array<string, string>
3946
*/
40-
protected function casts(): array
41-
{
42-
return [
43-
'email_verified_at' => 'datetime',
44-
'password' => 'hashed',
45-
];
46-
}
47+
protected $casts = [
48+
'email_verified_at' => 'datetime',
49+
'password' => 'hashed',
50+
];
4751
}

art/cover.png

82.8 KB
Loading

art/dashboard-dark-rtl.png

61.7 KB
Loading

0 commit comments

Comments
 (0)