├── .editorconfig ├── .env.docs ├── .env.example ├── .gitattributes ├── .gitignore ├── README.md ├── artisan ├── bootstrap ├── app.php └── cache │ └── .gitignore ├── composer.json ├── composer.lock ├── config ├── app.php ├── auth.php ├── broadcasting.php ├── cache.php ├── cors.php ├── data.php ├── database.php ├── filesystems.php ├── hashing.php ├── logging.php ├── mail.php ├── query-builder.php ├── queue.php ├── scribe.php ├── services.php ├── session.php ├── telescope.php └── view.php ├── database ├── .gitignore ├── factories │ └── Client │ │ └── UserFactory.php ├── migrations │ ├── 2019_08_19_000000_create_failed_jobs_table.php │ └── Client │ │ ├── 2014_10_12_000000_create_users_table.php │ │ └── 2014_10_12_100000_create_password_reset_tokens_table.php └── seeders │ ├── Client │ └── UserSeeder.php │ ├── DatabaseSeeder.php │ └── TestingSeeder.php ├── docker-compose.yml ├── grumphp.yml ├── package.json ├── phpunit.xml ├── pint.json ├── public ├── .htaccess ├── favicon.ico ├── index.php ├── robots.txt └── vendor │ └── telescope │ ├── app-dark.css │ ├── app.css │ ├── app.js │ ├── favicon.ico │ └── mix-manifest.json ├── resources ├── css │ └── app.css ├── js │ ├── app.js │ └── bootstrap.js └── views │ └── welcome.blade.php ├── routes ├── api.php ├── channels.php ├── console.php └── web.php ├── src ├── app │ ├── Application.php │ ├── Console │ │ └── Kernel.php │ ├── Exceptions │ │ └── Handler.php │ ├── Helpers │ │ └── DocStrategies │ │ │ ├── ApiResponseTags.php │ │ │ └── HasPaginationParameters.php │ ├── Http │ │ ├── Controllers │ │ │ └── Controller.php │ │ ├── Kernel.php │ │ └── Middleware │ │ │ ├── Authenticate.php │ │ │ ├── EncryptCookies.php │ │ │ ├── PreventRequestsDuringMaintenance.php │ │ │ ├── RedirectIfAuthenticated.php │ │ │ ├── SetAcceptJsonHeader.php │ │ │ ├── SetLocalLanguage.php │ │ │ ├── SetLogContext.php │ │ │ ├── TrimStrings.php │ │ │ ├── TrustHosts.php │ │ │ ├── TrustProxies.php │ │ │ ├── ValidateSignature.php │ │ │ └── VerifyCsrfToken.php │ ├── Providers │ │ ├── AppServiceProvider.php │ │ ├── AuthServiceProvider.php │ │ ├── BroadcastServiceProvider.php │ │ ├── EventServiceProvider.php │ │ ├── RouteServiceProvider.php │ │ └── TelescopeServiceProvider.php │ └── Traits │ │ └── ApiResponseHelper.php ├── domain │ └── Client │ │ └── Models │ │ └── User.php └── shared │ ├── Enums │ └── MorphEnum.php │ └── Helpers │ └── global.php ├── storage ├── app │ ├── .gitignore │ └── public │ │ └── .gitignore ├── framework │ ├── .gitignore │ ├── cache │ │ ├── .gitignore │ │ └── data │ │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ ├── testing │ │ └── .gitignore │ └── views │ │ └── .gitignore └── logs │ └── .gitignore ├── tests ├── CreatesApplication.php ├── Feature │ └── ExampleTest.php ├── Pest.php ├── TestCase.php └── Unit │ └── ExampleTest.php └── vite.config.js /.editorconfig: -------------------------------------------------------------------------------- 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 19 | -------------------------------------------------------------------------------- /.env.docs: -------------------------------------------------------------------------------- 1 | APP_DEBUG=false 2 | DB_DATABASE=sqlite 3 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | APP_NAME=Laravel 2 | APP_ENV=local 3 | APP_KEY= 4 | APP_DEBUG=true 5 | APP_URL=http://localhost 6 | 7 | LOG_CHANNEL=stack 8 | LOG_DEPRECATIONS_CHANNEL=null 9 | LOG_LEVEL=debug 10 | 11 | DB_CONNECTION=mysql 12 | DB_HOST=127.0.0.1 13 | DB_PORT=3306 14 | DB_DATABASE=example_app 15 | DB_USERNAME=root 16 | DB_PASSWORD= 17 | 18 | BROADCAST_DRIVER=log 19 | CACHE_DRIVER=file 20 | FILESYSTEM_DISK=local 21 | QUEUE_CONNECTION=sync 22 | SESSION_DRIVER=file 23 | SESSION_LIFETIME=120 24 | 25 | MEMCACHED_HOST=127.0.0.1 26 | 27 | REDIS_HOST=127.0.0.1 28 | REDIS_PASSWORD=null 29 | REDIS_PORT=6379 30 | 31 | MAIL_MAILER=smtp 32 | MAIL_HOST=mailpit 33 | MAIL_PORT=1025 34 | MAIL_USERNAME=null 35 | MAIL_PASSWORD=null 36 | MAIL_ENCRYPTION=null 37 | MAIL_FROM_ADDRESS="hello@example.com" 38 | MAIL_FROM_NAME="${APP_NAME}" 39 | 40 | AWS_ACCESS_KEY_ID= 41 | AWS_SECRET_ACCESS_KEY= 42 | AWS_DEFAULT_REGION=us-east-1 43 | AWS_BUCKET= 44 | AWS_USE_PATH_STYLE_ENDPOINT=false 45 | 46 | PUSHER_APP_ID= 47 | PUSHER_APP_KEY= 48 | PUSHER_APP_SECRET= 49 | PUSHER_HOST= 50 | PUSHER_PORT=443 51 | PUSHER_SCHEME=https 52 | PUSHER_APP_CLUSTER=mt1 53 | 54 | VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}" 55 | VITE_PUSHER_HOST="${PUSHER_HOST}" 56 | VITE_PUSHER_PORT="${PUSHER_PORT}" 57 | VITE_PUSHER_SCHEME="${PUSHER_SCHEME}" 58 | VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" 59 | 60 | #TELESCOPE_ENABLED=true 61 | 62 | # Sail related keys 63 | 64 | #SAIL_XDEBUG_MODE=develop,debug,coverage 65 | 66 | #APP_PORT=80 67 | #VITE_PORT=5173 68 | #FORWARD_DB_PORT=3306 69 | #FORWARD_REDIS_PORT=6379 70 | #FORWARD_MEILISEARCH_PORT=7700 71 | #FORWARD_MAILPIT_PORT=1025 72 | #FORWARD_MAILPIT_DASHBOARD_PORT=8025 73 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 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 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 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 20 | _ide_helper.php 21 | _ide_helper_models.php 22 | .phpstorm.meta.php 23 | /.scribe 24 | /public/docs -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 |
3 |
5 | A Laravel project with a Domain-Driven Design (DDD) structure, basic configuration, and commonly used packages pre-installed and configured, to help you start building your next big application. 6 |
7 | 8 | # Requirements 9 | - PHP ^8.1 10 | - Composer ^2.2 11 | 12 | # Installation 13 | ```bash 14 | composer create-project abd-wazzan/laravel-api-boilerplate api-app 15 | ``` 16 | Install dependencies 17 | ```bash 18 | cd api-app 19 | composer install 20 | ``` 21 | Setup .env file 22 | ```bash 23 | cp .env.example .env 24 | ``` 25 | Generate the application key 26 | ```bash 27 | php artisan key:generate 28 | ``` 29 | Run Locally 30 | ```bash 31 | php artisan serve 32 | ``` 33 | # Installed Packages 34 | 35 | General: 36 | - [Passport](https://laravel.com/docs/10.x/passport) 37 | - [Laravel Actions](https://laravelactions.com) 38 | - [Laravel Data](https://spatie.be/docs/laravel-data/v3/introduction) 39 | - [Laravel Query Builder](https://spatie.be/index.php/docs/laravel-query-builder/v5/introduction) 40 | 41 | Development: 42 | - [Laravel IDE Helper](https://github.com/barryvdh/laravel-ide-helper) 43 | - [Scribe API documentation tool](https://scribe.knuckles.wtf/laravel) 44 | - [Laravel Telescope](https://laravel.com/docs/10.x/telescope) 45 | - [Pest Testing Framework](https://pestphp.com/) 46 | - [Grum PHP](https://github.com/phpro/grumphp) 47 | - [Security Advisor](https://github.com/Roave/SecurityAdvisories) 48 | 49 | # Features 50 | - [DDD (Domain Driven Design)](#ddd) 51 | - [API Response Helper](#api-response-helper) 52 | - [Scribe Api Tags](#scribe-api-tags) 53 | - [Global Helper](#global-helper) 54 | - [Migration Structure](#migration-structure) 55 | - [Polymorphic Mapping](#polymorphic-mapping) 56 | - [Database Seeders](#database-seeders) 57 | - [Shared Directory](#shared-directory) 58 | - [Enable Model Strict Mode](https://laravel.com/docs/10.x/eloquent#configuring-eloquent-strictness) 59 | - [Pest testing framework](https://pestphp.com/docs/installation) 60 | 61 | ## DDD 62 | Software development approach that tries to bring the business language and the source code as close as possible. 63 | 64 | This structure is inspired by [LARAVEL BEYOND CRUD](https://laravel-beyond-crud.com/). 65 | 66 | ### Files Structure 67 | Domain Layer Example: 68 | 69 | src/Domain/Invoices/ 70 | ├── Actions 71 | ├── QueryBuilders 72 | ├── Collections 73 | ├── Data 74 | ├── Events 75 | ├── Exceptions 76 | ├── Listeners 77 | ├── Models 78 | ├── Rules 79 | └── States 80 | src/Domain/Products/ 81 | ├── Actions 82 | └── ..... 83 | 84 | Application Layer Example: 85 | 86 | The REST API application: 87 | src/App/Api/ 88 | ├── Products 89 | ├── Controllers 90 | ├── Middlewares 91 | ├── Requests 92 | ├── Queries 93 | ├── Filters 94 | └── Resources 95 | 96 | The Console application 97 | src/App/Console/ 98 | └── Commands 99 | 100 | The admin HTTP application: 101 | src/App/Admin/ 102 | ├── Products 103 | ├── Controllers 104 | ├── Middlewares 105 | ├── Requests 106 | ├── Resources 107 | ├── Queries 108 | ├── Filters 109 | └── ViewModels 110 | 111 | ### Dependency Illustration 112 | [](https://mermaid.live/edit#pako:eNptkV9PwjAUxb9KcxMSTAZh_xjswQRWfJKggC8yHup2lcVtnV2XiJTvbulEMPGtved3em7vPUDCU4QQ3gSrdmRN45IQMtk81Si2pNe7VUv8aLCWiky7ES-l4HmOgkwSmfHyxtBTw9H1QpGoS3nBsvKPHhn9gQlWoEShCO3OdWjeqvSkErV6vCd1IrJKJ802lEn2wmrcGmTWIo8Nij0RWDe5hui1e_lTjC6BRC0qFOzUxq9neunXeCpe1qjI5NrV_sNUOp0ze4cy2RHTgKJnjf7Tlk4ACwoUegqpHuvhBMcgd1hgDKE-pky8xxCXR82xRvLVvkwglKJBC5oqZRJpxvQ2CghfWV7rKqaZ5GLe7smsy4KKlc-cF2ejvkJ4gE8IHc_v-844GNuuZ49tx3Yt2EM4CvqeF7gjNxgNfN-xg6MFX-aBQX_oBY4_9H3XDtzB0HeO333zodw) 113 | 114 | ### Resources 115 | - [Domain Oriented Laravel](https://stitcher.io/blog/laravel-beyond-crud-01-domain-oriented-laravel) 116 | - [Working With Data](https://stitcher.io/blog/laravel-beyond-crud-02-working-with-data) 117 | - [Actions](https://stitcher.io/blog/laravel-beyond-crud-03-actions) 118 | - [Models](https://stitcher.io/blog/laravel-beyond-crud-04-models) 119 | - [States](https://stitcher.io/blog/laravel-beyond-crud-05-states) 120 | - [Managing Domains](https://stitcher.io/blog/laravel-beyond-crud-06-managing-domains) 121 | - [Application Layer](https://stitcher.io/blog/laravel-beyond-crud-07-entering-the-application-layer) 122 | - [View Models](https://stitcher.io/blog/laravel-beyond-crud-08-view-models) 123 | - [Test Factories](https://stitcher.io/blog/laravel-beyond-crud-09-test-factories) 124 | 125 | ## API Response Helper 126 | A simple trait allowing consistent API responses throughout your Laravel application. 127 | 128 | ### Available methods: 129 | | Method | Status | 130 | |:--------------------------|:-------| 131 | | `okResponse()` | `200` | 132 | | `createdResponse()` | `201` | 133 | | `failedResponse()` | `400` | 134 | | `unauthorizedResponse()` | `401` | 135 | | `forbiddenResponse()` | `403` | 136 | | `notFoundResponse()` | `404` | 137 | | `unprocessableResponse()` | `422` | 138 | | `serverErrorResponse()` | `500` | 139 | 140 | ### Usages Example: 141 | ```php 142 | okResponse(); 157 | } 158 | } 159 | ``` 160 | ## Scribe Api Tags 161 | Additional scribe tags that match the ApiResponseHelper responses. 162 | 163 | ### Available Response tags: 164 | | Tag | Status | 165 | |:-------------------------|:-------| 166 | | `@okResponse` | `200` | 167 | | `@createdResponse` | `201` | 168 | | `@failedResponse` | `400` | 169 | | `@unauthorizedResponse` | `401` | 170 | | `@forbiddenResponse` | `403` | 171 | | `@notFoundResponse` | `404` | 172 | | `@unprocessableResponse` | `422` | 173 | | `@serverErrorResponse` | `500` | 174 | 175 | ### Other Available tag: 176 | | Tag | Description | 177 | |:------------------|:-----------------------------------------------------------------| 178 | | `@usesPagination` | will add `page[number]` and `page[size]` to the query parameters | 179 | 180 | ### Usages Example: 181 | ```php 182 | all()); 215 | } 216 | 217 | } 218 | ``` 219 | 220 | ## Global Helper 221 | Simple php file that contains you global functions, which you can find it in `./src/shared/Helpers/global.php`. 222 | 223 | ## Migration Structure 224 | In order to group your migration files by their domains, you can create additional migration directories 225 | and load them in the `AppServiceProvider` using `loadMigrationsFrom` function: 226 | 227 | ```php 228 | loadMigrationsFrom([ 239 | database_path().DIRECTORY_SEPARATOR.'migrations'.DIRECTORY_SEPARATOR.'Client', 240 | ]); 241 | } 242 | } 243 | ``` 244 | 245 | ## Polymorphic Mapping 246 | Please read this [article](https://laravel-news.com/enforcing-morph-maps-in-laravel) first to identify the problem. 247 | 248 | In order to achieve the morph mapping, we created the `MorphEnum` that will contain each model morph key and then use it 249 | in `Relation::morphMap` function as shown in the example: 250 | ```php 251 | value => User::class, 276 | ]); 277 | } 278 | } 279 | ``` 280 | 281 | ## Database Seeders 282 | We generally have two types of seeded data: 283 | 284 | - Initial data: the project cannot function without it. For example, countries table data, and these data usually come 285 | from datasets. 286 | - Fake data: for testing purposes that can fill up any table instead of manually inserting row by row, this data is 287 | usually generated by factories. 288 | 289 | In order to prevent the fake data from being seeded in the production environment, we created a new seeder class 290 | called `TestingSeeder.php` which will contain all the fake data seeders and will only run in a non-production 291 | environment. The normal seeders will stay in `DatabaseSeeder.php`. 292 | 293 | ## Shared Directory 294 | The `src/shared/` directory is used for helper, traits, enums .... that are going to be used by the application and the domain. 295 | 296 | # Feedback 297 | I will be happy to hear your feedback! If you have any recommendation or suggestion, please send an e-mail 298 | to [Mail](mailto:abdulrahmanwazzan.pro@gmail.com). 299 | -------------------------------------------------------------------------------- /artisan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | make(Illuminate\Contracts\Console\Kernel::class); 34 | 35 | $status = $kernel->handle( 36 | $input = new Symfony\Component\Console\Input\ArgvInput, 37 | new Symfony\Component\Console\Output\ConsoleOutput 38 | ); 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Shutdown The Application 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Once Artisan has finished running, we will fire off the shutdown events 46 | | so that any final work may be done by the application before we shut 47 | | down the process. This is the last thing to happen to the request. 48 | | 49 | */ 50 | 51 | $kernel->terminate($input, $status); 52 | 53 | exit($status); 54 | -------------------------------------------------------------------------------- /bootstrap/app.php: -------------------------------------------------------------------------------- 1 | useAppPath(dirname(__DIR__) . '/src/app'); 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Bind Important Interfaces 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Next, we need to bind some important interfaces into the container so 24 | | we will be able to resolve them when needed. The kernels serve the 25 | | incoming requests to this application from both the web and CLI. 26 | | 27 | */ 28 | 29 | $app->singleton( 30 | Illuminate\Contracts\Http\Kernel::class, 31 | App\Http\Kernel::class 32 | ); 33 | 34 | $app->singleton( 35 | Illuminate\Contracts\Console\Kernel::class, 36 | App\Console\Kernel::class 37 | ); 38 | 39 | $app->singleton( 40 | Illuminate\Contracts\Debug\ExceptionHandler::class, 41 | App\Exceptions\Handler::class 42 | ); 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Return The Application 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This script returns the application instance. The instance is given to 50 | | the calling script so we can separate the building of the instances 51 | | from the actual running of the application and sending responses. 52 | | 53 | */ 54 | 55 | return $app; 56 | -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "abd-wazzan/laravel-api-boilerplate", 3 | "type": "project", 4 | "description": "A Laravel project with a Domain-Driven Design (DDD) structure, basic configuration, and commonly used packages pre-installed, directed towards building APIs.", 5 | "keywords": ["boilerplate", "laravel"], 6 | "license": "MIT", 7 | "require": { 8 | "php": "^8.1", 9 | "guzzlehttp/guzzle": "^7.5", 10 | "laravel/framework": "^10.4", 11 | "laravel/passport": "^11.8", 12 | "laravel/tinker": "^2.8", 13 | "lorisleiva/laravel-actions": "^2.5", 14 | "spatie/laravel-data": "^3.2", 15 | "spatie/laravel-query-builder": "^5.2" 16 | }, 17 | "require-dev": { 18 | "barryvdh/laravel-ide-helper": "^2.13", 19 | "fakerphp/faker": "^1.21.0", 20 | "knuckleswtf/scribe": "^4.17", 21 | "laravel/pint": "^1.7", 22 | "laravel/sail": "^1.21", 23 | "laravel/telescope": "^4.14", 24 | "mockery/mockery": "^1.5.1", 25 | "nunomaduro/collision": "^7.3", 26 | "pestphp/pest": "^2.2", 27 | "pestphp/pest-plugin-laravel": "^2.0", 28 | "phpro/grumphp": "^1.15", 29 | "roave/security-advisories": "dev-latest", 30 | "spatie/laravel-ignition": "^2.0" 31 | }, 32 | "autoload": { 33 | "psr-4": { 34 | "App\\": "src/app/", 35 | "Domain\\": "src/domain/", 36 | "Shared\\": "src/shared/", 37 | "Database\\Factories\\": "database/factories/", 38 | "Database\\Seeders\\": "database/seeders/" 39 | }, 40 | "files": [ 41 | "src/shared/Helpers/global.php" 42 | ] 43 | }, 44 | "autoload-dev": { 45 | "psr-4": { 46 | "Tests\\": "tests/" 47 | } 48 | }, 49 | "scripts": { 50 | "post-autoload-dump": [ 51 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", 52 | "@php artisan package:discover --ansi" 53 | ], 54 | "post-update-cmd": [ 55 | "@php artisan vendor:publish --tag=laravel-assets --ansi --force", 56 | "@php artisan ide-helper:generate", 57 | "@php artisan ide-helper:meta" 58 | ], 59 | "post-root-package-install": [ 60 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 61 | ], 62 | "post-create-project-cmd": [ 63 | "@php artisan key:generate --ansi" 64 | ] 65 | }, 66 | "extra": { 67 | "laravel": { 68 | "dont-discover": [ 69 | "barryvdh/laravel-ide-helper", 70 | "laravel/telescope" 71 | ] 72 | } 73 | }, 74 | "config": { 75 | "optimize-autoloader": true, 76 | "preferred-install": "dist", 77 | "sort-packages": true, 78 | "allow-plugins": { 79 | "pestphp/pest-plugin": true, 80 | "php-http/discovery": true, 81 | "phpro/grumphp": true 82 | } 83 | }, 84 | "minimum-stability": "stable", 85 | "prefer-stable": true 86 | } 87 | -------------------------------------------------------------------------------- /config/app.php: -------------------------------------------------------------------------------- 1 | env('APP_NAME', 'Laravel'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Application Environment 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This value determines the "environment" your application is currently 26 | | running in. This may determine how you prefer to configure various 27 | | services the application utilizes. Set this in your ".env" file. 28 | | 29 | */ 30 | 31 | 'env' => env('APP_ENV', 'production'), 32 | 33 | /* 34 | |-------------------------------------------------------------------------- 35 | | Application Debug Mode 36 | |-------------------------------------------------------------------------- 37 | | 38 | | When your application is in debug mode, detailed error messages with 39 | | stack traces will be shown on every error that occurs within your 40 | | application. If disabled, a simple generic error page is shown. 41 | | 42 | */ 43 | 44 | 'debug' => (bool) env('APP_DEBUG', false), 45 | 46 | /* 47 | |-------------------------------------------------------------------------- 48 | | Application URL 49 | |-------------------------------------------------------------------------- 50 | | 51 | | This URL is used by the console to properly generate URLs when using 52 | | the Artisan command line tool. You should set this to the root of 53 | | your application so that it is used when running Artisan tasks. 54 | | 55 | */ 56 | 57 | 'url' => env('APP_URL', 'http://localhost'), 58 | 59 | 'asset_url' => env('ASSET_URL'), 60 | 61 | /* 62 | |-------------------------------------------------------------------------- 63 | | Application Timezone 64 | |-------------------------------------------------------------------------- 65 | | 66 | | Here you may specify the default timezone for your application, which 67 | | will be used by the PHP date and date-time functions. We have gone 68 | | ahead and set this to a sensible default for you out of the box. 69 | | 70 | */ 71 | 72 | 'timezone' => 'UTC', 73 | 74 | /* 75 | |-------------------------------------------------------------------------- 76 | | Application Locale Configuration 77 | |-------------------------------------------------------------------------- 78 | | 79 | | The application locale determines the default locale that will be used 80 | | by the translation service provider. You are free to set this value 81 | | to any of the locales which will be supported by the application. 82 | | 83 | */ 84 | 85 | 'locale' => 'en', 86 | 87 | /* 88 | |-------------------------------------------------------------------------- 89 | | Application Fallback Locale 90 | |-------------------------------------------------------------------------- 91 | | 92 | | The fallback locale determines the locale to use when the current one 93 | | is not available. You may change the value to correspond to any of 94 | | the language folders that are provided through your application. 95 | | 96 | */ 97 | 98 | 'fallback_locale' => 'en', 99 | 100 | /* 101 | |-------------------------------------------------------------------------- 102 | | Faker Locale 103 | |-------------------------------------------------------------------------- 104 | | 105 | | This locale will be used by the Faker PHP library when generating fake 106 | | data for your database seeds. For example, this will be used to get 107 | | localized telephone numbers, street address information and more. 108 | | 109 | */ 110 | 111 | 'faker_locale' => 'en_US', 112 | 113 | /* 114 | |-------------------------------------------------------------------------- 115 | | Encryption Key 116 | |-------------------------------------------------------------------------- 117 | | 118 | | This key is used by the Illuminate encrypter service and should be set 119 | | to a random, 32 character string, otherwise these encrypted strings 120 | | will not be safe. Please do this before deploying an application! 121 | | 122 | */ 123 | 124 | 'key' => env('APP_KEY'), 125 | 126 | 'cipher' => 'AES-256-CBC', 127 | 128 | /* 129 | |-------------------------------------------------------------------------- 130 | | Maintenance Mode Driver 131 | |-------------------------------------------------------------------------- 132 | | 133 | | These configuration options determine the driver used to determine and 134 | | manage Laravel's "maintenance mode" status. The "cache" driver will 135 | | allow maintenance mode to be controlled across multiple machines. 136 | | 137 | | Supported drivers: "file", "cache" 138 | | 139 | */ 140 | 141 | 'maintenance' => [ 142 | 'driver' => 'file', 143 | // 'store' => 'redis', 144 | ], 145 | 146 | /* 147 | |-------------------------------------------------------------------------- 148 | | Autoloaded Service Providers 149 | |-------------------------------------------------------------------------- 150 | | 151 | | The service providers listed here will be automatically loaded on the 152 | | request to your application. Feel free to add your own services to 153 | | this array to grant expanded functionality to your applications. 154 | | 155 | */ 156 | 157 | 'providers' => [ 158 | 159 | /* 160 | * Laravel Framework Service Providers... 161 | */ 162 | Illuminate\Auth\AuthServiceProvider::class, 163 | Illuminate\Broadcasting\BroadcastServiceProvider::class, 164 | Illuminate\Bus\BusServiceProvider::class, 165 | Illuminate\Cache\CacheServiceProvider::class, 166 | Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class, 167 | Illuminate\Cookie\CookieServiceProvider::class, 168 | Illuminate\Database\DatabaseServiceProvider::class, 169 | Illuminate\Encryption\EncryptionServiceProvider::class, 170 | Illuminate\Filesystem\FilesystemServiceProvider::class, 171 | Illuminate\Foundation\Providers\FoundationServiceProvider::class, 172 | Illuminate\Hashing\HashServiceProvider::class, 173 | Illuminate\Mail\MailServiceProvider::class, 174 | Illuminate\Notifications\NotificationServiceProvider::class, 175 | Illuminate\Pagination\PaginationServiceProvider::class, 176 | Illuminate\Pipeline\PipelineServiceProvider::class, 177 | Illuminate\Queue\QueueServiceProvider::class, 178 | Illuminate\Redis\RedisServiceProvider::class, 179 | Illuminate\Auth\Passwords\PasswordResetServiceProvider::class, 180 | Illuminate\Session\SessionServiceProvider::class, 181 | Illuminate\Translation\TranslationServiceProvider::class, 182 | Illuminate\Validation\ValidationServiceProvider::class, 183 | Illuminate\View\ViewServiceProvider::class, 184 | 185 | /* 186 | * Package Service Providers... 187 | */ 188 | 189 | /* 190 | * Application Service Providers... 191 | */ 192 | App\Providers\AppServiceProvider::class, 193 | App\Providers\AuthServiceProvider::class, 194 | // App\Providers\BroadcastServiceProvider::class, 195 | App\Providers\EventServiceProvider::class, 196 | App\Providers\RouteServiceProvider::class, 197 | 198 | ], 199 | 200 | /* 201 | |-------------------------------------------------------------------------- 202 | | Class Aliases 203 | |-------------------------------------------------------------------------- 204 | | 205 | | This array of class aliases will be registered when this application 206 | | is started. However, feel free to register as many as you wish as 207 | | the aliases are "lazy" loaded so they don't hinder performance. 208 | | 209 | */ 210 | 211 | 'aliases' => Facade::defaultAliases()->merge([ 212 | // 'ExampleClass' => App\Example\ExampleClass::class, 213 | ])->toArray(), 214 | 215 | ]; 216 | -------------------------------------------------------------------------------- /config/auth.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'guard' => 'web', 18 | 'passwords' => 'users', 19 | ], 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Authentication Guards 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Next, you may define every authentication guard for your application. 27 | | Of course, a great default configuration has been defined for you 28 | | here which uses session storage and the Eloquent user provider. 29 | | 30 | | All authentication drivers have a user provider. This defines how the 31 | | users are actually retrieved out of your database or other storage 32 | | mechanisms used by this application to persist your user's data. 33 | | 34 | | Supported: "session" 35 | | 36 | */ 37 | 38 | 'guards' => [ 39 | 'web' => [ 40 | 'driver' => 'session', 41 | 'provider' => 'users', 42 | ], 43 | 'api' => [ 44 | 'driver' => 'passport', 45 | 'provider' => 'users', 46 | ], 47 | ], 48 | 49 | /* 50 | |-------------------------------------------------------------------------- 51 | | User Providers 52 | |-------------------------------------------------------------------------- 53 | | 54 | | All authentication drivers have a user provider. This defines how the 55 | | users are actually retrieved out of your database or other storage 56 | | mechanisms used by this application to persist your user's data. 57 | | 58 | | If you have multiple user tables or models you may configure multiple 59 | | sources which represent each model / table. These sources may then 60 | | be assigned to any extra authentication guards you have defined. 61 | | 62 | | Supported: "database", "eloquent" 63 | | 64 | */ 65 | 66 | 'providers' => [ 67 | 'users' => [ 68 | 'driver' => 'eloquent', 69 | 'model' => \Domain\Client\Models\User::class, 70 | ], 71 | 72 | // 'users' => [ 73 | // 'driver' => 'database', 74 | // 'table' => 'users', 75 | // ], 76 | ], 77 | 78 | /* 79 | |-------------------------------------------------------------------------- 80 | | Resetting Passwords 81 | |-------------------------------------------------------------------------- 82 | | 83 | | You may specify multiple password reset configurations if you have more 84 | | than one user table or model in the application and you want to have 85 | | separate password reset settings based on the specific user types. 86 | | 87 | | The expiry time is the number of minutes that each reset token will be 88 | | considered valid. This security feature keeps tokens short-lived so 89 | | they have less time to be guessed. You may change this as needed. 90 | | 91 | | The throttle setting is the number of seconds a user must wait before 92 | | generating more password reset tokens. This prevents the user from 93 | | quickly generating a very large amount of password reset tokens. 94 | | 95 | */ 96 | 97 | 'passwords' => [ 98 | 'users' => [ 99 | 'provider' => 'users', 100 | 'table' => 'password_reset_tokens', 101 | 'expire' => 60, 102 | 'throttle' => 60, 103 | ], 104 | ], 105 | 106 | /* 107 | |-------------------------------------------------------------------------- 108 | | Password Confirmation Timeout 109 | |-------------------------------------------------------------------------- 110 | | 111 | | Here you may define the amount of seconds before a password confirmation 112 | | times out and the user is prompted to re-enter their password via the 113 | | confirmation screen. By default, the timeout lasts for three hours. 114 | | 115 | */ 116 | 117 | 'password_timeout' => 10800, 118 | 119 | ]; 120 | -------------------------------------------------------------------------------- /config/broadcasting.php: -------------------------------------------------------------------------------- 1 | env('BROADCAST_DRIVER', 'null'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Broadcast Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the broadcast connections that will be used 26 | | to broadcast events to other systems or over websockets. Samples of 27 | | each available type of connection are provided inside this array. 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'pusher' => [ 34 | 'driver' => 'pusher', 35 | 'key' => env('PUSHER_APP_KEY'), 36 | 'secret' => env('PUSHER_APP_SECRET'), 37 | 'app_id' => env('PUSHER_APP_ID'), 38 | 'options' => [ 39 | 'host' => env('PUSHER_HOST') ?: 'api-' . env('PUSHER_APP_CLUSTER', 'mt1') . '.pusher.com', 40 | 'port' => env('PUSHER_PORT', 443), 41 | 'scheme' => env('PUSHER_SCHEME', 'https'), 42 | 'encrypted' => true, 43 | 'useTLS' => 'https' === env('PUSHER_SCHEME', 'https'), 44 | ], 45 | 'client_options' => [ 46 | // Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html 47 | ], 48 | ], 49 | 50 | 'ably' => [ 51 | 'driver' => 'ably', 52 | 'key' => env('ABLY_KEY'), 53 | ], 54 | 55 | 'redis' => [ 56 | 'driver' => 'redis', 57 | 'connection' => 'default', 58 | ], 59 | 60 | 'log' => [ 61 | 'driver' => 'log', 62 | ], 63 | 64 | 'null' => [ 65 | 'driver' => 'null', 66 | ], 67 | 68 | ], 69 | 70 | ]; 71 | -------------------------------------------------------------------------------- /config/cache.php: -------------------------------------------------------------------------------- 1 | env('CACHE_DRIVER', 'file'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Cache Stores 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the cache "stores" for your application as 26 | | well as their drivers. You may even define multiple stores for the 27 | | same cache driver to group types of items stored in your caches. 28 | | 29 | | Supported drivers: "apc", "array", "database", "file", 30 | | "memcached", "redis", "dynamodb", "octane", "null" 31 | | 32 | */ 33 | 34 | 'stores' => [ 35 | 36 | 'apc' => [ 37 | 'driver' => 'apc', 38 | ], 39 | 40 | 'array' => [ 41 | 'driver' => 'array', 42 | 'serialize' => false, 43 | ], 44 | 45 | 'database' => [ 46 | 'driver' => 'database', 47 | 'table' => 'cache', 48 | 'connection' => null, 49 | 'lock_connection' => null, 50 | ], 51 | 52 | 'file' => [ 53 | 'driver' => 'file', 54 | 'path' => storage_path('framework/cache/data'), 55 | ], 56 | 57 | 'memcached' => [ 58 | 'driver' => 'memcached', 59 | 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), 60 | 'sasl' => [ 61 | env('MEMCACHED_USERNAME'), 62 | env('MEMCACHED_PASSWORD'), 63 | ], 64 | 'options' => [ 65 | // Memcached::OPT_CONNECT_TIMEOUT => 2000, 66 | ], 67 | 'servers' => [ 68 | [ 69 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'), 70 | 'port' => env('MEMCACHED_PORT', 11211), 71 | 'weight' => 100, 72 | ], 73 | ], 74 | ], 75 | 76 | 'redis' => [ 77 | 'driver' => 'redis', 78 | 'connection' => 'cache', 79 | 'lock_connection' => 'default', 80 | ], 81 | 82 | 'dynamodb' => [ 83 | 'driver' => 'dynamodb', 84 | 'key' => env('AWS_ACCESS_KEY_ID'), 85 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 86 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 87 | 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), 88 | 'endpoint' => env('DYNAMODB_ENDPOINT'), 89 | ], 90 | 91 | 'octane' => [ 92 | 'driver' => 'octane', 93 | ], 94 | 95 | ], 96 | 97 | /* 98 | |-------------------------------------------------------------------------- 99 | | Cache Key Prefix 100 | |-------------------------------------------------------------------------- 101 | | 102 | | When utilizing the APC, database, memcached, Redis, or DynamoDB cache 103 | | stores there might be other applications using the same cache. For 104 | | that reason, you may prefix every cache key to avoid collisions. 105 | | 106 | */ 107 | 108 | 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_cache_'), 109 | 110 | ]; 111 | -------------------------------------------------------------------------------- /config/cors.php: -------------------------------------------------------------------------------- 1 | ['api/*', 'sanctum/csrf-cookie'], 19 | 20 | 'allowed_methods' => ['*'], 21 | 22 | 'allowed_origins' => ['*'], 23 | 24 | 'allowed_origins_patterns' => [], 25 | 26 | 'allowed_headers' => ['*'], 27 | 28 | 'exposed_headers' => [], 29 | 30 | 'max_age' => 0, 31 | 32 | 'supports_credentials' => false, 33 | 34 | ]; 35 | -------------------------------------------------------------------------------- /config/data.php: -------------------------------------------------------------------------------- 1 | [DATE_ATOM, "Y-m-d H:i", "Y-m-d H", "Y-m-d"], 10 | 11 | /* 12 | * Global transformers will take complex types and transform them into simple 13 | * types. 14 | */ 15 | 'transformers' => [ 16 | DateTimeInterface::class => \Spatie\LaravelData\Transformers\DateTimeInterfaceTransformer::class, 17 | \Illuminate\Contracts\Support\Arrayable::class => \Spatie\LaravelData\Transformers\ArrayableTransformer::class, 18 | BackedEnum::class => Spatie\LaravelData\Transformers\EnumTransformer::class, 19 | ], 20 | 21 | /* 22 | * Global casts will cast values into complex types when creating a data 23 | * object from simple types. 24 | */ 25 | 'casts' => [ 26 | DateTimeInterface::class => Spatie\LaravelData\Casts\DateTimeInterfaceCast::class, 27 | BackedEnum::class => Spatie\LaravelData\Casts\EnumCast::class, 28 | ], 29 | 30 | /* 31 | * Rule inferrers can be configured here. They will automatically add 32 | * validation rules to properties of a data object based upon 33 | * the type of the property. 34 | */ 35 | 'rule_inferrers' => [ 36 | Spatie\LaravelData\RuleInferrers\SometimesRuleInferrer::class, 37 | Spatie\LaravelData\RuleInferrers\NullableRuleInferrer::class, 38 | Spatie\LaravelData\RuleInferrers\RequiredRuleInferrer::class, 39 | Spatie\LaravelData\RuleInferrers\BuiltInTypesRuleInferrer::class, 40 | Spatie\LaravelData\RuleInferrers\AttributesRuleInferrer::class, 41 | ], 42 | 43 | /** 44 | * Normalizers return an array representation of the payload, or null if 45 | * it cannot normalize the payload. The normalizers below are used for 46 | * every data object, unless overridden in a specific data object class. 47 | */ 48 | 'normalizers' => [ 49 | Spatie\LaravelData\Normalizers\ModelNormalizer::class, 50 | // Spatie\LaravelData\Normalizers\FormRequestNormalizer::class, 51 | Spatie\LaravelData\Normalizers\ArrayableNormalizer::class, 52 | Spatie\LaravelData\Normalizers\ObjectNormalizer::class, 53 | Spatie\LaravelData\Normalizers\ArrayNormalizer::class, 54 | Spatie\LaravelData\Normalizers\JsonNormalizer::class, 55 | ], 56 | 57 | /* 58 | * Data objects can be wrapped into a key like 'data' when used as a resource, 59 | * this key can be set globally here for all data objects. You can pass in 60 | * `null` if you want to disable wrapping. 61 | */ 62 | 'wrap' => null, 63 | 64 | /** 65 | * Adds a specific caster to the Symphony VarDumper component which hides 66 | * some properties from data objects and collections when being dumped 67 | * by `dump` or `dd`. Can be 'enabled', 'disabled' or 'development' 68 | * which will only enable the caster locally. 69 | */ 70 | 'var_dumper_caster_mode' => 'development', 71 | ]; 72 | -------------------------------------------------------------------------------- /config/database.php: -------------------------------------------------------------------------------- 1 | env('DB_CONNECTION', 'mysql'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Database Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here are each of the database connections setup for your application. 26 | | Of course, examples of configuring each database platform that is 27 | | supported by Laravel is shown below to make development simple. 28 | | 29 | | 30 | | All database work in Laravel is done through the PHP PDO facilities 31 | | so make sure you have the driver for your particular database of 32 | | choice installed on your machine before you begin development. 33 | | 34 | */ 35 | 36 | 'connections' => [ 37 | 38 | 'sqlite' => [ 39 | 'driver' => 'sqlite', 40 | 'url' => env('DATABASE_URL'), 41 | 'database' => env('DB_DATABASE', database_path('database.sqlite')), 42 | 'prefix' => '', 43 | 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), 44 | ], 45 | 46 | 'mysql' => [ 47 | 'driver' => 'mysql', 48 | 'url' => env('DATABASE_URL'), 49 | 'host' => env('DB_HOST', '127.0.0.1'), 50 | 'port' => env('DB_PORT', '3306'), 51 | 'database' => env('DB_DATABASE', 'forge'), 52 | 'username' => env('DB_USERNAME', 'forge'), 53 | 'password' => env('DB_PASSWORD', ''), 54 | 'unix_socket' => env('DB_SOCKET', ''), 55 | 'charset' => 'utf8mb4', 56 | 'collation' => 'utf8mb4_unicode_ci', 57 | 'prefix' => '', 58 | 'prefix_indexes' => true, 59 | 'strict' => true, 60 | 'engine' => null, 61 | 'options' => extension_loaded('pdo_mysql') ? array_filter([ 62 | PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), 63 | ]) : [], 64 | ], 65 | 66 | 'pgsql' => [ 67 | 'driver' => 'pgsql', 68 | 'url' => env('DATABASE_URL'), 69 | 'host' => env('DB_HOST', '127.0.0.1'), 70 | 'port' => env('DB_PORT', '5432'), 71 | 'database' => env('DB_DATABASE', 'forge'), 72 | 'username' => env('DB_USERNAME', 'forge'), 73 | 'password' => env('DB_PASSWORD', ''), 74 | 'charset' => 'utf8', 75 | 'prefix' => '', 76 | 'prefix_indexes' => true, 77 | 'search_path' => 'public', 78 | 'sslmode' => 'prefer', 79 | ], 80 | 81 | 'sqlsrv' => [ 82 | 'driver' => 'sqlsrv', 83 | 'url' => env('DATABASE_URL'), 84 | 'host' => env('DB_HOST', 'localhost'), 85 | 'port' => env('DB_PORT', '1433'), 86 | 'database' => env('DB_DATABASE', 'forge'), 87 | 'username' => env('DB_USERNAME', 'forge'), 88 | 'password' => env('DB_PASSWORD', ''), 89 | 'charset' => 'utf8', 90 | 'prefix' => '', 91 | 'prefix_indexes' => true, 92 | // 'encrypt' => env('DB_ENCRYPT', 'yes'), 93 | // 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'), 94 | ], 95 | 96 | ], 97 | 98 | /* 99 | |-------------------------------------------------------------------------- 100 | | Migration Repository Table 101 | |-------------------------------------------------------------------------- 102 | | 103 | | This table keeps track of all the migrations that have already run for 104 | | your application. Using this information, we can determine which of 105 | | the migrations on disk haven't actually been run in the database. 106 | | 107 | */ 108 | 109 | 'migrations' => 'migrations', 110 | 111 | /* 112 | |-------------------------------------------------------------------------- 113 | | Redis Databases 114 | |-------------------------------------------------------------------------- 115 | | 116 | | Redis is an open source, fast, and advanced key-value store that also 117 | | provides a richer body of commands than a typical key-value system 118 | | such as APC or Memcached. Laravel makes it easy to dig right in. 119 | | 120 | */ 121 | 122 | 'redis' => [ 123 | 124 | 'client' => env('REDIS_CLIENT', 'phpredis'), 125 | 126 | 'options' => [ 127 | 'cluster' => env('REDIS_CLUSTER', 'redis'), 128 | 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_database_'), 129 | ], 130 | 131 | 'default' => [ 132 | 'url' => env('REDIS_URL'), 133 | 'host' => env('REDIS_HOST', '127.0.0.1'), 134 | 'username' => env('REDIS_USERNAME'), 135 | 'password' => env('REDIS_PASSWORD'), 136 | 'port' => env('REDIS_PORT', '6379'), 137 | 'database' => env('REDIS_DB', '0'), 138 | ], 139 | 140 | 'cache' => [ 141 | 'url' => env('REDIS_URL'), 142 | 'host' => env('REDIS_HOST', '127.0.0.1'), 143 | 'username' => env('REDIS_USERNAME'), 144 | 'password' => env('REDIS_PASSWORD'), 145 | 'port' => env('REDIS_PORT', '6379'), 146 | 'database' => env('REDIS_CACHE_DB', '1'), 147 | ], 148 | 149 | ], 150 | 151 | ]; 152 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | env('FILESYSTEM_DISK', 'local'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Filesystem Disks 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure as many filesystem "disks" as you wish, and you 24 | | may even configure multiple disks of the same driver. Defaults have 25 | | been set up for each driver as an example of the required values. 26 | | 27 | | Supported Drivers: "local", "ftp", "sftp", "s3" 28 | | 29 | */ 30 | 31 | 'disks' => [ 32 | 33 | 'local' => [ 34 | 'driver' => 'local', 35 | 'root' => storage_path('app'), 36 | 'throw' => false, 37 | ], 38 | 39 | 'public' => [ 40 | 'driver' => 'local', 41 | 'root' => storage_path('app/public'), 42 | 'url' => env('APP_URL') . '/storage', 43 | 'visibility' => 'public', 44 | 'throw' => false, 45 | ], 46 | 47 | 's3' => [ 48 | 'driver' => 's3', 49 | 'key' => env('AWS_ACCESS_KEY_ID'), 50 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 51 | 'region' => env('AWS_DEFAULT_REGION'), 52 | 'bucket' => env('AWS_BUCKET'), 53 | 'url' => env('AWS_URL'), 54 | 'endpoint' => env('AWS_ENDPOINT'), 55 | 'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false), 56 | 'throw' => false, 57 | ], 58 | 59 | ], 60 | 61 | /* 62 | |-------------------------------------------------------------------------- 63 | | Symbolic Links 64 | |-------------------------------------------------------------------------- 65 | | 66 | | Here you may configure the symbolic links that will be created when the 67 | | `storage:link` Artisan command is executed. The array keys should be 68 | | the locations of the links and the values should be their targets. 69 | | 70 | */ 71 | 72 | 'links' => [ 73 | public_path('storage') => storage_path('app/public'), 74 | ], 75 | 76 | ]; 77 | -------------------------------------------------------------------------------- /config/hashing.php: -------------------------------------------------------------------------------- 1 | 'bcrypt', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Bcrypt Options 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may specify the configuration options that should be used when 26 | | passwords are hashed using the Bcrypt algorithm. This will allow you 27 | | to control the amount of time it takes to hash the given password. 28 | | 29 | */ 30 | 31 | 'bcrypt' => [ 32 | 'rounds' => env('BCRYPT_ROUNDS', 10), 33 | ], 34 | 35 | /* 36 | |-------------------------------------------------------------------------- 37 | | Argon Options 38 | |-------------------------------------------------------------------------- 39 | | 40 | | Here you may specify the configuration options that should be used when 41 | | passwords are hashed using the Argon algorithm. These will allow you 42 | | to control the amount of time it takes to hash the given password. 43 | | 44 | */ 45 | 46 | 'argon' => [ 47 | 'memory' => 65536, 48 | 'threads' => 1, 49 | 'time' => 4, 50 | ], 51 | 52 | ]; 53 | -------------------------------------------------------------------------------- /config/logging.php: -------------------------------------------------------------------------------- 1 | env('LOG_CHANNEL', 'stack'), 21 | 22 | /* 23 | |-------------------------------------------------------------------------- 24 | | Deprecations Log Channel 25 | |-------------------------------------------------------------------------- 26 | | 27 | | This option controls the log channel that should be used to log warnings 28 | | regarding deprecated PHP and library features. This allows you to get 29 | | your application ready for upcoming major versions of dependencies. 30 | | 31 | */ 32 | 33 | 'deprecations' => [ 34 | 'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'), 35 | 'trace' => false, 36 | ], 37 | 38 | /* 39 | |-------------------------------------------------------------------------- 40 | | Log Channels 41 | |-------------------------------------------------------------------------- 42 | | 43 | | Here you may configure the log channels for your application. Out of 44 | | the box, Laravel uses the Monolog PHP logging library. This gives 45 | | you a variety of powerful log handlers / formatters to utilize. 46 | | 47 | | Available Drivers: "single", "daily", "slack", "syslog", 48 | | "errorlog", "monolog", 49 | | "custom", "stack" 50 | | 51 | */ 52 | 53 | 'channels' => [ 54 | 'stack' => [ 55 | 'driver' => 'stack', 56 | 'channels' => ['single'], 57 | 'ignore_exceptions' => false, 58 | ], 59 | 60 | 'single' => [ 61 | 'driver' => 'single', 62 | 'path' => storage_path('logs/laravel.log'), 63 | 'level' => env('LOG_LEVEL', 'debug'), 64 | ], 65 | 66 | 'daily' => [ 67 | 'driver' => 'daily', 68 | 'path' => storage_path('logs/laravel.log'), 69 | 'level' => env('LOG_LEVEL', 'debug'), 70 | 'days' => 14, 71 | ], 72 | 73 | 'slack' => [ 74 | 'driver' => 'slack', 75 | 'url' => env('LOG_SLACK_WEBHOOK_URL'), 76 | 'username' => 'Laravel Log', 77 | 'emoji' => ':boom:', 78 | 'level' => env('LOG_LEVEL', 'critical'), 79 | ], 80 | 81 | 'papertrail' => [ 82 | 'driver' => 'monolog', 83 | 'level' => env('LOG_LEVEL', 'debug'), 84 | 'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class), 85 | 'handler_with' => [ 86 | 'host' => env('PAPERTRAIL_URL'), 87 | 'port' => env('PAPERTRAIL_PORT'), 88 | 'connectionString' => 'tls://' . env('PAPERTRAIL_URL') . ':' . env('PAPERTRAIL_PORT'), 89 | ], 90 | ], 91 | 92 | 'stderr' => [ 93 | 'driver' => 'monolog', 94 | 'level' => env('LOG_LEVEL', 'debug'), 95 | 'handler' => StreamHandler::class, 96 | 'formatter' => env('LOG_STDERR_FORMATTER'), 97 | 'with' => [ 98 | 'stream' => 'php://stderr', 99 | ], 100 | ], 101 | 102 | 'syslog' => [ 103 | 'driver' => 'syslog', 104 | 'level' => env('LOG_LEVEL', 'debug'), 105 | 'facility' => LOG_USER, 106 | ], 107 | 108 | 'errorlog' => [ 109 | 'driver' => 'errorlog', 110 | 'level' => env('LOG_LEVEL', 'debug'), 111 | ], 112 | 113 | 'null' => [ 114 | 'driver' => 'monolog', 115 | 'handler' => NullHandler::class, 116 | ], 117 | 118 | 'emergency' => [ 119 | 'path' => storage_path('logs/laravel.log'), 120 | ], 121 | ], 122 | 123 | ]; 124 | -------------------------------------------------------------------------------- /config/mail.php: -------------------------------------------------------------------------------- 1 | env('MAIL_MAILER', 'smtp'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Mailer Configurations 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure all of the mailers used by your application plus 24 | | their respective settings. Several examples have been configured for 25 | | you and you are free to add your own as your application requires. 26 | | 27 | | Laravel supports a variety of mail "transport" drivers to be used while 28 | | sending an e-mail. You will specify which one you are using for your 29 | | mailers below. You are free to add additional mailers as required. 30 | | 31 | | Supported: "smtp", "sendmail", "mailgun", "ses", "ses-v2", 32 | | "postmark", "log", "array", "failover" 33 | | 34 | */ 35 | 36 | 'mailers' => [ 37 | 'smtp' => [ 38 | 'transport' => 'smtp', 39 | 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), 40 | 'port' => env('MAIL_PORT', 587), 41 | 'encryption' => env('MAIL_ENCRYPTION', 'tls'), 42 | 'username' => env('MAIL_USERNAME'), 43 | 'password' => env('MAIL_PASSWORD'), 44 | 'timeout' => null, 45 | 'local_domain' => env('MAIL_EHLO_DOMAIN'), 46 | ], 47 | 48 | 'ses' => [ 49 | 'transport' => 'ses', 50 | ], 51 | 52 | 'mailgun' => [ 53 | 'transport' => 'mailgun', 54 | // 'client' => [ 55 | // 'timeout' => 5, 56 | // ], 57 | ], 58 | 59 | 'postmark' => [ 60 | 'transport' => 'postmark', 61 | // 'client' => [ 62 | // 'timeout' => 5, 63 | // ], 64 | ], 65 | 66 | 'sendmail' => [ 67 | 'transport' => 'sendmail', 68 | 'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'), 69 | ], 70 | 71 | 'log' => [ 72 | 'transport' => 'log', 73 | 'channel' => env('MAIL_LOG_CHANNEL'), 74 | ], 75 | 76 | 'array' => [ 77 | 'transport' => 'array', 78 | ], 79 | 80 | 'failover' => [ 81 | 'transport' => 'failover', 82 | 'mailers' => [ 83 | 'smtp', 84 | 'log', 85 | ], 86 | ], 87 | ], 88 | 89 | /* 90 | |-------------------------------------------------------------------------- 91 | | Global "From" Address 92 | |-------------------------------------------------------------------------- 93 | | 94 | | You may wish for all e-mails sent by your application to be sent from 95 | | the same address. Here, you may specify a name and address that is 96 | | used globally for all e-mails that are sent by your application. 97 | | 98 | */ 99 | 100 | 'from' => [ 101 | 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), 102 | 'name' => env('MAIL_FROM_NAME', 'Example'), 103 | ], 104 | 105 | /* 106 | |-------------------------------------------------------------------------- 107 | | Markdown Mail Settings 108 | |-------------------------------------------------------------------------- 109 | | 110 | | If you are using Markdown based email rendering, you may configure your 111 | | theme and component paths here, allowing you to customize the design 112 | | of the emails. Or, you may simply stick with the Laravel defaults! 113 | | 114 | */ 115 | 116 | 'markdown' => [ 117 | 'theme' => 'default', 118 | 119 | 'paths' => [ 120 | resource_path('views/vendor/mail'), 121 | ], 122 | ], 123 | 124 | ]; 125 | -------------------------------------------------------------------------------- /config/query-builder.php: -------------------------------------------------------------------------------- 1 | [ 12 | 'include' => 'include', 13 | 14 | 'filter' => 'filter', 15 | 16 | 'sort' => 'sort', 17 | 18 | 'fields' => 'fields', 19 | 20 | 'append' => 'append', 21 | ], 22 | 23 | /* 24 | * Related model counts are included using the relationship name suffixed with this string. 25 | * For example: GET /users?include=postsCount 26 | */ 27 | 'count_suffix' => 'Count', 28 | 29 | /* 30 | * By default the package will throw an `InvalidFilterQuery` exception when a filter in the 31 | * URL is not allowed in the `allowedFilters()` method. 32 | */ 33 | 'disable_invalid_filter_query_exception' => false, 34 | 35 | /* 36 | * By default the package will throw an `InvalidSortQuery` exception when a sort in the 37 | * URL is not allowed in the `allowedSorts()` method. 38 | */ 39 | 'disable_invalid_sort_query_exception' => false, 40 | 41 | /* 42 | * By default the package inspects query string of request using $request->query(). 43 | * You can change this behavior to inspect the request body using $request->input() 44 | * by setting this value to `body`. 45 | * 46 | * Possible values: `query_string`, `body` 47 | */ 48 | 'request_data_source' => 'query_string', 49 | ]; 50 | -------------------------------------------------------------------------------- /config/queue.php: -------------------------------------------------------------------------------- 1 | env('QUEUE_CONNECTION', 'sync'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Queue Connections 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure the connection information for each server that 24 | | is used by your application. A default configuration has been added 25 | | for each back-end shipped with Laravel. You are free to add more. 26 | | 27 | | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null" 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'sync' => [ 34 | 'driver' => 'sync', 35 | ], 36 | 37 | 'database' => [ 38 | 'driver' => 'database', 39 | 'table' => 'jobs', 40 | 'queue' => 'default', 41 | 'retry_after' => 90, 42 | 'after_commit' => false, 43 | ], 44 | 45 | 'beanstalkd' => [ 46 | 'driver' => 'beanstalkd', 47 | 'host' => 'localhost', 48 | 'queue' => 'default', 49 | 'retry_after' => 90, 50 | 'block_for' => 0, 51 | 'after_commit' => false, 52 | ], 53 | 54 | 'sqs' => [ 55 | 'driver' => 'sqs', 56 | 'key' => env('AWS_ACCESS_KEY_ID'), 57 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 58 | 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), 59 | 'queue' => env('SQS_QUEUE', 'default'), 60 | 'suffix' => env('SQS_SUFFIX'), 61 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 62 | 'after_commit' => false, 63 | ], 64 | 65 | 'redis' => [ 66 | 'driver' => 'redis', 67 | 'connection' => 'default', 68 | 'queue' => env('REDIS_QUEUE', 'default'), 69 | 'retry_after' => 90, 70 | 'block_for' => null, 71 | 'after_commit' => false, 72 | ], 73 | 74 | ], 75 | 76 | /* 77 | |-------------------------------------------------------------------------- 78 | | Failed Queue Jobs 79 | |-------------------------------------------------------------------------- 80 | | 81 | | These options configure the behavior of failed queue job logging so you 82 | | can control which database and table are used to store the jobs that 83 | | have failed. You may change them to any database / table you wish. 84 | | 85 | */ 86 | 87 | 'failed' => [ 88 | 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'), 89 | 'database' => env('DB_CONNECTION', 'mysql'), 90 | 'table' => 'failed_jobs', 91 | ], 92 | 93 | ]; 94 | -------------------------------------------------------------------------------- /config/scribe.php: -------------------------------------------------------------------------------- 1 | 'default', 8 | 9 | /* 10 | * The HTML54 | Laravel has wonderful documentation covering every aspect of the framework. Whether you are a newcomer or have prior experience with Laravel, we recommend reading our documentation from beginning to end. 55 |
56 |74 | Laracasts offers thousands of video tutorials on Laravel, PHP, and JavaScript development. Check them out, see for yourself, and massively level up your development skills in the process. 75 |
76 |94 | Laravel News is a community driven portal and newsletter aggregating all of the latest and most important news in the Laravel ecosystem, including new package releases and tutorials. 95 |
96 |114 | Laravel's robust library of first-party tools and libraries, such as Forge, Vapor, Nova, and Envoyer help you take your projects to the next level. Pair them with powerful open source libraries like Cashier, Dusk, Echo, Horizon, Sanctum, Telescope, and more. 115 |
116 |