Skip to content

Commit 3de682a

Browse files
committed
Create Laravel app
0 parents  commit 3de682a

Some content is hidden

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

58 files changed

+10249
-0
lines changed

.editorconfig

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 4
7+
indent_style = space
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false
13+
14+
[*.{yml,yaml}]
15+
indent_size = 2
16+
17+
[docker-compose.yml]
18+
indent_size = 4

.gitattributes

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
* text=auto eol=lf
2+
3+
*.blade.php diff=html
4+
*.css diff=css
5+
*.html diff=html
6+
*.md diff=markdown
7+
*.php diff=php
8+
9+
/.github export-ignore
10+
CHANGELOG.md export-ignore
11+
.styleci.yml export-ignore

.github/workflows/issues.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: issues
2+
3+
on:
4+
issues:
5+
types: [labeled]
6+
7+
permissions:
8+
issues: write
9+
10+
jobs:
11+
help-wanted:
12+
uses: laravel/.github/.github/workflows/issues.yml@main

.github/workflows/pull-requests.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: pull requests
2+
3+
on:
4+
pull_request_target:
5+
types: [opened]
6+
7+
permissions:
8+
pull-requests: write
9+
10+
jobs:
11+
uneditable:
12+
uses: laravel/.github/.github/workflows/pull-requests.yml@main

.github/workflows/tests.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- '*.x'
8+
pull_request:
9+
schedule:
10+
- cron: '0 0 * * *'
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
tests:
17+
runs-on: ubuntu-latest
18+
19+
strategy:
20+
fail-fast: true
21+
matrix:
22+
php: [8.2, 8.3]
23+
24+
name: PHP ${{ matrix.php }}
25+
26+
steps:
27+
- name: Checkout code
28+
uses: actions/checkout@v4
29+
30+
- name: Setup PHP
31+
uses: shivammathur/setup-php@v2
32+
with:
33+
php-version: ${{ matrix.php }}
34+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite
35+
coverage: none
36+
37+
- name: Install Composer dependencies
38+
run: composer install --prefer-dist --no-interaction --no-progress
39+
40+
- name: Copy environment file
41+
run: cp .env.example .env
42+
43+
- name: Generate app key
44+
run: php artisan key:generate
45+
46+
- name: Execute tests
47+
run: vendor/bin/phpunit
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: update changelog
2+
3+
on:
4+
release:
5+
types: [released]
6+
7+
permissions: {}
8+
9+
jobs:
10+
update:
11+
permissions:
12+
contents: write
13+
uses: laravel/.github/.github/workflows/update-changelog.yml@main

.gitignore

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/.phpunit.cache
2+
/node_modules
3+
/public/build
4+
/public/hot
5+
/public/storage
6+
/storage/*.key
7+
/vendor
8+
.env
9+
.env.backup
10+
.env.production
11+
.phpunit.result.cache
12+
Homestead.json
13+
Homestead.yaml
14+
auth.json
15+
npm-debug.log
16+
yarn-error.log
17+
/.fleet
18+
/.idea
19+
/.vscode

.styleci.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
php:
2+
preset: laravel
3+
disabled:
4+
- no_unused_imports
5+
finder:
6+
not-name:
7+
- index.php
8+
js: true
9+
css: true

app/Http/Controllers/Controller.php

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
3+
namespace App\Http\Controllers;
4+
5+
abstract class Controller
6+
{
7+
//
8+
}

app/Models/User.php

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<?php
2+
3+
namespace App\Models;
4+
5+
// use Illuminate\Contracts\Auth\MustVerifyEmail;
6+
use Illuminate\Database\Eloquent\Factories\HasFactory;
7+
use Illuminate\Foundation\Auth\User as Authenticatable;
8+
use Illuminate\Notifications\Notifiable;
9+
10+
class User extends Authenticatable
11+
{
12+
use HasFactory, Notifiable;
13+
14+
/**
15+
* The attributes that are mass assignable.
16+
*
17+
* @var array<int, string>
18+
*/
19+
protected $fillable = [
20+
'name',
21+
'email',
22+
'password',
23+
];
24+
25+
/**
26+
* The attributes that should be hidden for serialization.
27+
*
28+
* @var array<int, string>
29+
*/
30+
protected $hidden = [
31+
'password',
32+
'remember_token',
33+
];
34+
35+
/**
36+
* Get the attributes that should be cast.
37+
*
38+
* @return array<string, string>
39+
*/
40+
protected function casts(): array
41+
{
42+
return [
43+
'email_verified_at' => 'datetime',
44+
'password' => 'hashed',
45+
];
46+
}
47+
}

app/Providers/AppServiceProvider.php

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
namespace App\Providers;
4+
5+
use Illuminate\Support\ServiceProvider;
6+
7+
class AppServiceProvider extends ServiceProvider
8+
{
9+
/**
10+
* Register any application services.
11+
*/
12+
public function register(): void
13+
{
14+
//
15+
}
16+
17+
/**
18+
* Bootstrap any application services.
19+
*/
20+
public function boot(): void
21+
{
22+
//
23+
}
24+
}

artisan

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
use Symfony\Component\Console\Input\ArgvInput;
5+
6+
define('LARAVEL_START', microtime(true));
7+
8+
// Register the Composer autoloader...
9+
require __DIR__.'/vendor/autoload.php';
10+
11+
// Bootstrap Laravel and handle the command...
12+
$status = (require_once __DIR__.'/bootstrap/app.php')
13+
->handleCommand(new ArgvInput);
14+
15+
exit($status);

bootstrap/app.php

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
use Illuminate\Foundation\Application;
4+
use Illuminate\Foundation\Configuration\Exceptions;
5+
use Illuminate\Foundation\Configuration\Middleware;
6+
7+
return Application::configure(basePath: dirname(__DIR__))
8+
->withRouting(
9+
web: __DIR__.'/../routes/web.php',
10+
commands: __DIR__.'/../routes/console.php',
11+
health: '/up',
12+
)
13+
->withMiddleware(function (Middleware $middleware) {
14+
//
15+
})
16+
->withExceptions(function (Exceptions $exceptions) {
17+
//
18+
})->create();

bootstrap/cache/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore

bootstrap/providers.php

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
3+
return [
4+
App\Providers\AppServiceProvider::class,
5+
];

composer.json

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"name": "laravel/laravel",
3+
"type": "project",
4+
"description": "The skeleton application for the Laravel framework.",
5+
"keywords": ["laravel", "framework"],
6+
"license": "MIT",
7+
"require": {
8+
"php": "^8.2",
9+
"laravel/framework": "^11.0",
10+
"laravel/tinker": "^2.9"
11+
},
12+
"require-dev": {
13+
"fakerphp/faker": "^1.23",
14+
"laravel/pint": "^1.13",
15+
"laravel/sail": "^1.26",
16+
"mockery/mockery": "^1.6",
17+
"nunomaduro/collision": "^8.0",
18+
"phpunit/phpunit": "^11.0.1",
19+
"spatie/laravel-ignition": "^2.4"
20+
},
21+
"autoload": {
22+
"psr-4": {
23+
"App\\": "app/",
24+
"Database\\Factories\\": "database/factories/",
25+
"Database\\Seeders\\": "database/seeders/"
26+
}
27+
},
28+
"autoload-dev": {
29+
"psr-4": {
30+
"Tests\\": "tests/"
31+
}
32+
},
33+
"scripts": {
34+
"post-autoload-dump": [
35+
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
36+
"@php artisan package:discover --ansi"
37+
],
38+
"post-update-cmd": [
39+
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
40+
],
41+
"post-root-package-install": [
42+
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
43+
],
44+
"post-create-project-cmd": [
45+
"@php artisan key:generate --ansi",
46+
"@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"",
47+
"@php artisan migrate --graceful --ansi"
48+
]
49+
},
50+
"extra": {
51+
"laravel": {
52+
"dont-discover": []
53+
}
54+
},
55+
"config": {
56+
"optimize-autoloader": true,
57+
"preferred-install": "dist",
58+
"sort-packages": true,
59+
"allow-plugins": {
60+
"pestphp/pest-plugin": true,
61+
"php-http/discovery": true
62+
}
63+
},
64+
"minimum-stability": "stable",
65+
"prefer-stable": true
66+
}

0 commit comments

Comments
 (0)