Skip to content

Commit d8dc1a4

Browse files
committed
Add Laravel structures
1 parent 367f35e commit d8dc1a4

30 files changed

Lines changed: 1606 additions & 17 deletions

.env.example

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
APP_NAME=OpenSTAManager
2+
APP_ENV=local
3+
APP_KEY=
4+
APP_DEBUG=true
5+
APP_URL=http://localhost
6+
7+
APP_LOCALE=en
8+
APP_FALLBACK_LOCALE=en
9+
APP_FAKER_LOCALE=en_US
10+
11+
APP_MAINTENANCE_DRIVER=file
12+
# APP_MAINTENANCE_STORE=database
13+
14+
PHP_CLI_SERVER_WORKERS=4
15+
16+
BCRYPT_ROUNDS=12
17+
18+
LOG_CHANNEL=stack
19+
LOG_STACK=single
20+
LOG_DEPRECATIONS_CHANNEL=null
21+
LOG_LEVEL=debug
22+
23+
SESSION_DRIVER=file
24+
SESSION_LIFETIME=120
25+
SESSION_ENCRYPT=false
26+
SESSION_PATH=/
27+
SESSION_DOMAIN=null
28+
29+
BROADCAST_CONNECTION=log
30+
FILESYSTEM_DISK=local
31+
QUEUE_CONNECTION=null
32+
33+
CACHE_STORE=file
34+
# CACHE_PREFIX=
35+
36+
MEMCACHED_HOST=127.0.0.1
37+
38+
REDIS_CLIENT=phpredis
39+
REDIS_HOST=127.0.0.1
40+
REDIS_PASSWORD=null
41+
REDIS_PORT=6379
42+
43+
MAIL_MAILER=log
44+
MAIL_SCHEME=null
45+
MAIL_HOST=127.0.0.1
46+
MAIL_PORT=2525
47+
MAIL_USERNAME=null
48+
MAIL_PASSWORD=null
49+
MAIL_FROM_ADDRESS="hello@example.com"
50+
MAIL_FROM_NAME="${APP_NAME}"

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,6 @@ modules.json
103103
codeception.yml
104104
!.gitkeep
105105
.vscode
106-
.php-cs-fixer.cache
106+
.php-cs-fixer.cache
107+
.phpunit.*
108+
.env

artisan

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

bootstrap/app.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
api: __DIR__.'/../routes/api.php',
11+
commands: __DIR__.'/../routes/console.php',
12+
health: '/up',
13+
)
14+
->withMiddleware(function (Middleware $middleware): void {
15+
//
16+
})
17+
->withExceptions(function (Exceptions $exceptions): void {
18+
//
19+
})->create()
20+
->useAppPath(realpath(__DIR__ . '/../src'))
21+
->useStoragePath(realpath(__DIR__ . '/../files/temp'));

bootstrap/cache/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore

bootstrap/providers.php

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

composer.json

Lines changed: 64 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,28 @@
2828
"ext-simplexml": "*",
2929
"ext-xsl": "*",
3030
"ext-zip": "*",
31+
"api-platform/laravel": "^4.1",
3132
"davidepastore/codice-fiscale": "^0.9.1",
3233
"devcode-it/ical-easy-reader": "dev-main",
3334
"devcode-it/sdd_ita": "dev-master",
3435
"digitick/sepa-xml": "^2.1",
3536
"doctrine/sql-formatter": "^1.5",
36-
"dragonmantank/cron-expression": "^1.0",
37+
"dragonmantank/cron-expression": "^3.0",
3738
"endroid/qr-code": "^6.0",
3839
"ergebnis/json-printer": "^3.8",
3940
"ezyang/htmlpurifier": "^4.8",
4041
"filp/whoops": "^2.15.0",
4142
"greenlion/php-sql-parser": "^4.5",
4243
"guzzlehttp/guzzle": "^7.0.1",
4344
"ifsnop/mysqldump-php": "^2.3",
44-
"illuminate/database": "^10.0",
45-
"illuminate/cache": "^10.0",
46-
"illuminate/filesystem": "^10.0",
45+
"illuminate/cache": "^12.0",
46+
"illuminate/database": "^12.0",
47+
"illuminate/filesystem": "^12.0",
4748
"intervention/image": "^3.0",
4849
"jurosh/pdf-merge": "^2.1",
50+
"laravel/framework": "^12.0",
51+
"laravel/sanctum": "^4.0",
52+
"laravel/tinker": "^2.0",
4953
"league/csv": "^9.7.0",
5054
"league/flysystem": "^3.0",
5155
"league/flysystem-ftp": "^3.0",
@@ -59,20 +63,27 @@
5963
"respect/validation": "^2.0",
6064
"servo/fluidxml": "^2.0",
6165
"slim/flash": "^0.4.0",
66+
"spatie/laravel-route-attributes": "^1.25",
6267
"spipu/html2pdf": "^5.0.0",
63-
"symfony/filesystem": "^6.0",
64-
"symfony/finder": "^6.0",
68+
"symfony/filesystem": "^7.0",
69+
"symfony/finder": "^7.0",
70+
"symfony/framework-bundle": "^7.0",
6571
"symfony/polyfill-ctype": "^1.8",
66-
"symfony/translation": "^6.0",
67-
"symfony/var-dumper": "^6.0",
72+
"symfony/translation": "^7.0",
73+
"symfony/var-dumper": "^7.0",
6874
"thenetworg/oauth2-azure": "^2.0",
6975
"voku/stringy": "^6.0.0",
7076
"willdurand/geocoder": "^4.2"
7177
},
7278
"require-dev": {
79+
"fakerphp/faker": "^1.23",
7380
"friendsofphp/php-cs-fixer": "^3.53",
74-
"phpunit/phpunit": "^11.5",
75-
"rector/rector": "^2.0"
81+
"laravel/pail": "^1.2.2",
82+
"laravel/pint": "^1.24",
83+
"laravel/sail": "^1.41",
84+
"mockery/mockery": "^1.6",
85+
"nunomaduro/collision": "^8.6",
86+
"phpunit/phpunit": "^10|^11"
7687
},
7788
"autoload": {
7889
"psr-4": {
@@ -141,6 +152,11 @@
141152
"lib/deprecated.php"
142153
]
143154
},
155+
"extra": {
156+
"laravel": {
157+
"dont-discover": []
158+
}
159+
},
144160
"config": {
145161
"sort-packages": true,
146162
"optimize-autoloader": true,
@@ -154,5 +170,43 @@
154170
"allow-plugins": {
155171
"kylekatarnls/update-helper": true
156172
}
173+
},
174+
"scripts": {
175+
"unit-tests": "phpunit --configuration phpunit.xml",
176+
"format": "php-cs-fixer fix",
177+
"setup": [
178+
"composer install",
179+
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\"",
180+
"@php artisan key:generate",
181+
"@php artisan migrate --force",
182+
"npm install",
183+
"npm run build"
184+
],
185+
"dev": [
186+
"Composer\\Config::disableProcessTimeout",
187+
"npx concurrently -c \"#93c5fd,#c4b5fd,#fdba74\" \"php artisan serve\" \"php artisan queue:listen --tries=1\" \"npm run dev\" --names='server,queue,vite'"
188+
],
189+
"test": [
190+
"@php artisan config:clear --ansi",
191+
"@php artisan test"
192+
],
193+
"post-autoload-dump": [
194+
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
195+
"@php artisan package:discover --ansi"
196+
],
197+
"post-update-cmd": [
198+
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
199+
],
200+
"post-root-package-install": [
201+
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
202+
],
203+
"post-create-project-cmd": [
204+
"@php artisan key:generate --ansi",
205+
"@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"",
206+
"@php artisan migrate --graceful --ansi"
207+
],
208+
"pre-package-uninstall": [
209+
"Illuminate\\Foundation\\ComposerScripts::prePackageUninstall"
210+
]
157211
}
158212
}

config.example.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737

3838
// Impostazioni di debug
3939
$debug = false;
40+
$api_development = false; // Se true, disabilita l'autenticazione dell'API
4041

4142
$disable_hooks = false;
4243

0 commit comments

Comments
 (0)