├── .docker ├── db │ ├── .gitignore │ ├── my.cnf │ └── sql │ │ └── .gitignore ├── logs │ └── .gitignore ├── nginx │ ├── default.conf │ └── nginx.conf ├── php │ ├── .bashrc │ ├── Dockerfile │ ├── docker.conf │ ├── entrypoint.sh │ └── php.ini ├── phpmyadmin │ └── .gitignore └── redis │ └── .gitignore ├── .editorconfig ├── .env.example ├── .gitattributes ├── .gitignore ├── .npmrc ├── README.md ├── app ├── Http │ └── Controllers │ │ └── Controller.php ├── Models │ └── User.php └── Providers │ └── AppServiceProvider.php ├── artisan ├── bootstrap ├── app.php ├── cache │ └── .gitignore └── providers.php ├── composer.json ├── composer.lock ├── config ├── app.php ├── auth.php ├── cache.php ├── database.php ├── filesystems.php ├── logging.php ├── mail.php ├── queue.php ├── services.php └── session.php ├── database ├── .gitignore ├── factories │ └── UserFactory.php ├── migrations │ ├── 0001_01_01_000000_create_users_table.php │ ├── 0001_01_01_000001_create_cache_table.php │ └── 0001_01_01_000002_create_jobs_table.php └── seeders │ └── DatabaseSeeder.php ├── docker-compose.yml ├── lang └── en │ ├── auth.php │ ├── pagination.php │ ├── passwords.php │ └── validation.php ├── package-lock.json ├── package.json ├── phpunit.xml ├── public ├── .htaccess ├── favicon.ico ├── index.php └── robots.txt ├── rector.php ├── resources ├── css │ └── app.css ├── js │ ├── app.js │ └── bootstrap.js └── views │ └── welcome.blade.php ├── routes ├── console.php └── web.php ├── storage ├── app │ ├── .gitignore │ ├── private │ │ └── .gitignore │ └── public │ │ └── .gitignore ├── framework │ ├── .gitignore │ ├── cache │ │ ├── .gitignore │ │ └── data │ │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ ├── testing │ │ └── .gitignore │ └── views │ │ └── .gitignore └── logs │ └── .gitignore ├── tests ├── Feature │ └── ExampleTest.php ├── Pest.php ├── TestCase.php └── Unit │ └── ExampleTest.php └── vite.config.js /.docker/db/.gitignore: -------------------------------------------------------------------------------- 1 | /data 2 | -------------------------------------------------------------------------------- /.docker/db/my.cnf: -------------------------------------------------------------------------------- 1 | [mysqld] 2 | character-set-server = utf8mb4 3 | collation-server = utf8mb4_bin 4 | 5 | default-authentication-plugin = mysql_native_password 6 | 7 | log-error = /var/log/mysql/mysql-error.log 8 | 9 | slow_query_log = 1 10 | slow_query_log_file = /var/log/mysql/mysql-slow.log 11 | long_query_time = 5.0 12 | log_queries_not_using_indexes = 0 13 | 14 | general_log = 1 15 | general_log_file = /var/log/mysql/mysql-query.log 16 | 17 | [mysql] 18 | default-character-set = utf8mb4 19 | 20 | [client] 21 | default-character-set = utf8mb4 22 | -------------------------------------------------------------------------------- /.docker/db/sql/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /.docker/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /.docker/nginx/default.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | index index.php index.html; 4 | root /var/www/public; 5 | 6 | client_max_body_size 100M; # 413 Request Entity Too Large 7 | 8 | location / { 9 | root /var/www/public; 10 | index index.html index.php; 11 | try_files $uri $uri/ /index.php?$query_string; 12 | } 13 | 14 | location ~ \.php$ { 15 | try_files $uri =404; 16 | fastcgi_split_path_info ^(.+\.php)(/.+)$; 17 | fastcgi_pass php:9000; 18 | fastcgi_read_timeout 3600; 19 | fastcgi_index index.php; 20 | include fastcgi_params; 21 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 22 | fastcgi_param PATH_INFO $fastcgi_path_info; 23 | send_timeout 3600; 24 | proxy_connect_timeout 3600; 25 | proxy_read_timeout 3600; 26 | proxy_send_timeout 3600; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /.docker/nginx/nginx.conf: -------------------------------------------------------------------------------- 1 | user nginx; 2 | worker_processes 1; 3 | 4 | error_log /var/log/nginx/error.log warn; 5 | pid /var/run/nginx.pid; 6 | 7 | events { 8 | worker_connections 1024; 9 | } 10 | 11 | http { 12 | include /etc/nginx/mime.types; 13 | default_type application/octet-stream; 14 | 15 | log_format main '$remote_addr - $remote_user [$time_local] "$request" ' 16 | '$status $body_bytes_sent "$http_referer" ' 17 | '"$http_user_agent" "$http_x_forwarded_for"'; 18 | 19 | access_log /var/log/nginx/access.log main; 20 | 21 | sendfile on; 22 | #tcp_nopush on; 23 | 24 | keepalive_timeout 65; 25 | 26 | server_tokens off; 27 | chunked_transfer_encoding off; 28 | 29 | gzip on; 30 | gzip_types application/json; 31 | gzip_min_length 1000; 32 | 33 | include /etc/nginx/conf.d/*.conf; 34 | } 35 | -------------------------------------------------------------------------------- /.docker/php/.bashrc: -------------------------------------------------------------------------------- 1 | # ~/.bashrc: executed by bash(1) for non-login shells. 2 | 3 | # Note: PS1 and umask are already set in /etc/profile. You should not 4 | # need this unless you want different defaults for root. 5 | PS1='${debian_chroot:+($debian_chroot)}\h:\w\$ ' 6 | umask 022 7 | 8 | # You may uncomment the following lines if you want `ls' to be colorized: 9 | export SHELL 10 | export LS_OPTIONS='--color=auto' 11 | eval $(dircolors ~/dircolors-solarized/dircolors.256dark) 12 | alias ls='ls $LS_OPTIONS' 13 | alias ll='ls $LS_OPTIONS -l' 14 | alias l='ls $LS_OPTIONS -lA' 15 | 16 | # Some more alias to avoid making mistakes: 17 | alias rm='rm -i' 18 | alias cp='cp -i' 19 | alias mv='mv -i' 20 | 21 | alias phpd='php -dzend_extension=xdebug.so -dxdebug.mode=debug -dxdebug.idekey=PHPSTORM -dxdebug.start_with_request=yes -dxdebug.client_host=host.docker.internal -dxdebug.client_port=9001' 22 | -------------------------------------------------------------------------------- /.docker/php/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:8.4-fpm 2 | 3 | COPY php.ini /usr/local/etc/php/ 4 | COPY docker.conf /usr/local/etc/php-fpm.d/docker.conf 5 | COPY .bashrc /root/ 6 | 7 | # Copy the entrypoint script 8 | COPY entrypoint.sh /usr/local/bin/entrypoint.sh 9 | RUN chmod +x /usr/local/bin/entrypoint.sh 10 | 11 | # mix 12 | RUN apt-get update \ 13 | && apt-get install -y build-essential zlib1g-dev default-mysql-client curl gnupg procps vim git unzip libzip-dev libpq-dev \ 14 | && docker-php-ext-install zip pdo_mysql pdo_pgsql pgsql 15 | 16 | # intl 17 | RUN apt-get install -y libicu-dev \ 18 | && docker-php-ext-configure intl \ 19 | && docker-php-ext-install intl 20 | 21 | # gd 22 | RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev && \ 23 | docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ && \ 24 | docker-php-ext-install gd 25 | 26 | # redis 27 | RUN pecl install redis && docker-php-ext-enable redis 28 | 29 | # pcov 30 | RUN pecl install pcov && docker-php-ext-enable pcov 31 | 32 | # pcntl 33 | RUN docker-php-ext-install pcntl 34 | 35 | # Xdebug 36 | # RUN pecl install xdebug \ 37 | # && docker-php-ext-enable xdebug \ 38 | # && echo ";zend_extension=xdebug" > /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini 39 | 40 | # Node.js, NPM, Yarn 41 | RUN curl -sL https://deb.nodesource.com/setup_22.x | bash - 42 | RUN apt-get install -y nodejs 43 | RUN npm install npm@latest -g 44 | RUN npm install yarn -g 45 | 46 | # Composer 47 | RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" 48 | RUN php composer-setup.php 49 | RUN php -r "unlink('composer-setup.php');" 50 | RUN mv composer.phar /usr/local/bin/composer 51 | 52 | ENV COMPOSER_ALLOW_SUPERUSER 1 53 | ENV COMPOSER_HOME /composer 54 | ENV PATH $PATH:/composer/vendor/bin 55 | RUN composer config --global process-timeout 3600 56 | RUN composer global require "laravel/installer" 57 | 58 | WORKDIR /root 59 | RUN git clone https://github.com/seebi/dircolors-solarized 60 | 61 | EXPOSE 5173 62 | WORKDIR /var/www 63 | 64 | #entrypoint 65 | ENTRYPOINT ["entrypoint.sh"] 66 | CMD ["php-fpm"] -------------------------------------------------------------------------------- /.docker/php/docker.conf: -------------------------------------------------------------------------------- 1 | [global] 2 | error_log = /proc/self/fd/2 3 | ;request_terminate_timeout = 1h 4 | 5 | [www] 6 | ; if we send this to /proc/self/fd/1, it never appears 7 | access.log = /proc/self/fd/1 8 | 9 | clear_env = no 10 | 11 | ; Ensure worker stdout and stderr are sent to the main error log. 12 | catch_workers_output = yes 13 | -------------------------------------------------------------------------------- /.docker/php/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | # Set permissions for Laravel directories 5 | chown -R www-data:www-data /var/www/storage /var/www/bootstrap/cache 6 | chmod -R 775 /var/www/storage /var/www/bootstrap/cache 7 | 8 | # permissions for PHPMyAdmin 9 | mkdir -p /sessions 10 | 11 | chmod 777 /sessions 12 | 13 | exec "$@" -------------------------------------------------------------------------------- /.docker/php/php.ini: -------------------------------------------------------------------------------- 1 | ; Example 2 | 3 | ; [Date] 4 | ; date.timezone = "Asia/Tokyo" 5 | 6 | ; [mbstring] 7 | ; mbstring.language = Japanese 8 | -------------------------------------------------------------------------------- /.docker/phpmyadmin/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /.docker/redis/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /.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.example: -------------------------------------------------------------------------------- 1 | APP_NAME=Laravel 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 | DB_CONNECTION=mysql 24 | DB_HOST=db 25 | DB_PORT=3306 26 | DB_DATABASE=refactorian 27 | DB_USERNAME=refactorian 28 | DB_PASSWORD=refactorian 29 | 30 | SESSION_DRIVER=database 31 | SESSION_LIFETIME=120 32 | SESSION_ENCRYPT=false 33 | SESSION_PATH=/ 34 | SESSION_DOMAIN=null 35 | 36 | BROADCAST_CONNECTION=log 37 | FILESYSTEM_DISK=local 38 | QUEUE_CONNECTION=database 39 | 40 | CACHE_STORE=database 41 | # CACHE_PREFIX= 42 | 43 | MEMCACHED_HOST=127.0.0.1 44 | 45 | REDIS_CLIENT=phpredis 46 | REDIS_HOST=redis 47 | REDIS_PASSWORD=null 48 | REDIS_PORT=6379 49 | 50 | MAIL_MAILER=smtp 51 | MAIL_HOST=mail 52 | MAIL_PORT=1025 53 | MAIL_USERNAME=null 54 | MAIL_PASSWORD=null 55 | MAIL_FROM_ADDRESS="hello@example.com" 56 | MAIL_FROM_NAME="${APP_NAME}" 57 | 58 | AWS_ACCESS_KEY_ID= 59 | AWS_SECRET_ACCESS_KEY= 60 | AWS_DEFAULT_REGION=us-east-1 61 | AWS_BUCKET= 62 | AWS_USE_PATH_STYLE_ENDPOINT=false 63 | 64 | VITE_APP_NAME="${APP_NAME}" 65 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | # # Set the registry to your Artifactory registry over HTTPS 2 | # registry=https://your-artifactory-url/npm/repository/npm-group/ 3 | 4 | # # Specify the CA file for HTTPS requests (replace /path/to/your/cafile.pem with the actual path) 5 | # cafile=/path/to/your/cafile.pem 6 | 7 | # # Specify authentication details (replace placeholders with your actual credentials) 8 | # //your-artifactory-url/npm/repository/npm-group/:_authToken=your-auth-token 9 | 10 | # # Other configuration options 11 | # progress=false 12 | # loglevel=info 13 | 14 | # # Set a custom cache directory for npm packages 15 | # cache=/path/to/your/npm-cache 16 | 17 | # # Specify the location for storing global npm packages 18 | # prefix=/path/to/global/npm-packages 19 | 20 | # # Use a specific Node.js version 21 | # engine-strict=true 22 | # engine-0.12=false 23 | # engine-4=true 24 | 25 | # # Disable package-lock creation 26 | # package-lock=false 27 | 28 | # # Use a custom user-agent string 29 | # user-agent=my-custom-user-agent 30 | 31 | # # Set the default script to run on "npm start" 32 | # start=custom-start-script 33 | 34 | # # Disable SSL for a specific registry (if needed) 35 | # registry=http://insecure-registry-url/ 36 | 37 | # # Set proxy configurations 38 | # proxy=http://proxy.example.com:8080/ 39 | # https-proxy=http://proxy.example.com:8080/ 40 | 41 | # # Ignore SSL errors 42 | # strict-ssl=false 43 | 44 | # # Set the timeout for HTTP requests 45 | # timeout=60000 46 | 47 | # # Set the number of concurrent connections 48 | # maxsockets=8 49 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

Laravel Logo

2 | 3 | # Laravel Docker Starter Kit 4 | - Laravel v12.x 5 | - PHP v8.4.x 6 | - MySQL v8.1.x (default) 7 | - MariaDB v10.11.x 8 | - PostgreSQL v16.x 9 | - pgAdmin v4.x 10 | - phpMyAdmin v5.x 11 | - Mailpit v1.x 12 | - Node.js v18.x 13 | - NPM v10.x 14 | - Yarn v1.x 15 | - Vite v5.x 16 | - Rector v1.x 17 | - Redis v7.2.x 18 | 19 | # Requirements 20 | - Stable version of [Docker](https://docs.docker.com/engine/install/) 21 | - Compatible version of [Docker Compose](https://docs.docker.com/compose/install/#install-compose) 22 | 23 | # How To Deploy 24 | 25 | ### For first time only ! 26 | - `git clone https://github.com/refactorian/laravel-docker.git` 27 | - `cd laravel-docker` 28 | - `docker compose up -d --build` 29 | - `docker compose exec php bash` 30 | - `composer setup` 31 | 32 | ### From the second time onwards 33 | - `docker compose up -d` 34 | 35 | # Notes 36 | 37 | ### Laravel Versions 38 | - [Laravel 12.x](https://github.com/refactorian/laravel-docker/tree/main) 39 | - [Laravel 11.x](https://github.com/refactorian/laravel-docker/tree/laravel_11x) 40 | - [Laravel 10.x](https://github.com/refactorian/laravel-docker/tree/laravel_10x) 41 | 42 | ### Laravel App 43 | - URL: http://localhost 44 | 45 | ### Mailpit 46 | - URL: http://localhost:8025 47 | 48 | ### phpMyAdmin 49 | - URL: http://localhost:8080 50 | - Server: `db` 51 | - Username: `refactorian` 52 | - Password: `refactorian` 53 | - Database: `refactorian` 54 | 55 | ### Adminer 56 | - URL: http://localhost:9090 57 | - Server: `db` 58 | - Username: `refactorian` 59 | - Password: `refactorian` 60 | - Database: `refactorian` 61 | 62 | ### Basic docker compose commands 63 | - Build or rebuild services 64 | - `docker compose build` 65 | - Create and start containers 66 | - `docker compose up -d` 67 | - Stop and remove containers, networks 68 | - `docker compose down` 69 | - Stop all services 70 | - `docker compose stop` 71 | - Restart service containers 72 | - `docker compose restart` 73 | - Run a command inside a container 74 | - `docker compose exec [container] [command]` 75 | 76 | ### Useful Laravel Commands 77 | - Display basic information about your application 78 | - `php artisan about` 79 | - Remove the configuration cache file 80 | - `php artisan config:clear` 81 | - Flush the application cache 82 | - `php artisan cache:clear` 83 | - Clear all cached events and listeners 84 | - `php artisan event:clear` 85 | - Delete all of the jobs from the specified queue 86 | - `php artisan queue:clear` 87 | - Remove the route cache file 88 | - `php artisan route:clear` 89 | - Clear all compiled view files 90 | - `php artisan view:clear` 91 | - Remove the compiled class file 92 | - `php artisan clear-compiled` 93 | - Remove the cached bootstrap files 94 | - `php artisan optimize:clear` 95 | - Delete the cached mutex files created by scheduler 96 | - `php artisan schedule:clear-cache` 97 | - Flush expired password reset tokens 98 | - `php artisan auth:clear-resets` 99 | 100 | ### Laravel Pint (Code Style Fixer | PHP-CS-Fixer) 101 | - Format all files 102 | - `vendor/bin/pint` 103 | - Format specific files or directories 104 | - `vendor/bin/pint app/Models` 105 | - `vendor/bin/pint app/Models/User.php` 106 | - Format all files with preview 107 | - `vendor/bin/pint -v` 108 | - Format uncommitted changes according to Git 109 | - `vendor/bin/pint --dirty` 110 | - Inspect all files 111 | - `vendor/bin/pint --test` 112 | 113 | ### Rector 114 | - Dry Run 115 | - `vendor/bin/rector process --dry-run` 116 | - Process 117 | - `vendor/bin/rector process` 118 | 119 | # Alternatives 120 | - [Laravel Sail](https://laravel.com/docs/master/sail) 121 | - [Laravel Herd](https://herd.laravel.com/) 122 | - [Laradock](https://laradock.io/) -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | */ 13 | use HasFactory, Notifiable; 14 | 15 | /** 16 | * The attributes that are mass assignable. 17 | * 18 | * @var list 19 | */ 20 | protected $fillable = [ 21 | 'name', 22 | 'email', 23 | 'password', 24 | ]; 25 | 26 | /** 27 | * The attributes that should be hidden for serialization. 28 | * 29 | * @var list 30 | */ 31 | protected $hidden = [ 32 | 'password', 33 | 'remember_token', 34 | ]; 35 | 36 | /** 37 | * Get the attributes that should be cast. 38 | * 39 | * @return array 40 | */ 41 | protected function casts(): array 42 | { 43 | return [ 44 | 'email_verified_at' => 'datetime', 45 | 'password' => 'hashed', 46 | ]; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | handleCommand(new ArgvInput); 17 | 18 | exit($status); 19 | -------------------------------------------------------------------------------- /bootstrap/app.php: -------------------------------------------------------------------------------- 1 | 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(); 19 | -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /bootstrap/providers.php: -------------------------------------------------------------------------------- 1 | env('APP_NAME', 'Laravel'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Application Environment 21 | |-------------------------------------------------------------------------- 22 | | 23 | | This value determines the "environment" your application is currently 24 | | running in. This may determine how you prefer to configure various 25 | | services the application utilizes. Set this in your ".env" file. 26 | | 27 | */ 28 | 29 | 'env' => env('APP_ENV', 'production'), 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Application Debug Mode 34 | |-------------------------------------------------------------------------- 35 | | 36 | | When your application is in debug mode, detailed error messages with 37 | | stack traces will be shown on every error that occurs within your 38 | | application. If disabled, a simple generic error page is shown. 39 | | 40 | */ 41 | 42 | 'debug' => (bool) env('APP_DEBUG', false), 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Application URL 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This URL is used by the console to properly generate URLs when using 50 | | the Artisan command line tool. You should set this to the root of 51 | | the application so that it's available within Artisan commands. 52 | | 53 | */ 54 | 55 | 'url' => env('APP_URL', 'http://localhost'), 56 | 57 | /* 58 | |-------------------------------------------------------------------------- 59 | | Application Timezone 60 | |-------------------------------------------------------------------------- 61 | | 62 | | Here you may specify the default timezone for your application, which 63 | | will be used by the PHP date and date-time functions. The timezone 64 | | is set to "UTC" by default as it is suitable for most use cases. 65 | | 66 | */ 67 | 68 | 'timezone' => 'UTC', 69 | 70 | /* 71 | |-------------------------------------------------------------------------- 72 | | Application Locale Configuration 73 | |-------------------------------------------------------------------------- 74 | | 75 | | The application locale determines the default locale that will be used 76 | | by Laravel's translation / localization methods. This option can be 77 | | set to any locale for which you plan to have translation strings. 78 | | 79 | */ 80 | 81 | 'locale' => env('APP_LOCALE', 'en'), 82 | 83 | 'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'), 84 | 85 | 'faker_locale' => env('APP_FAKER_LOCALE', 'en_US'), 86 | 87 | /* 88 | |-------------------------------------------------------------------------- 89 | | Encryption Key 90 | |-------------------------------------------------------------------------- 91 | | 92 | | This key is utilized by Laravel's encryption services and should be set 93 | | to a random, 32 character string to ensure that all encrypted values 94 | | are secure. You should do this prior to deploying the application. 95 | | 96 | */ 97 | 98 | 'cipher' => 'AES-256-CBC', 99 | 100 | 'key' => env('APP_KEY'), 101 | 102 | 'previous_keys' => [ 103 | ...array_filter( 104 | explode(',', env('APP_PREVIOUS_KEYS', '')) 105 | ), 106 | ], 107 | 108 | /* 109 | |-------------------------------------------------------------------------- 110 | | Maintenance Mode Driver 111 | |-------------------------------------------------------------------------- 112 | | 113 | | These configuration options determine the driver used to determine and 114 | | manage Laravel's "maintenance mode" status. The "cache" driver will 115 | | allow maintenance mode to be controlled across multiple machines. 116 | | 117 | | Supported drivers: "file", "cache" 118 | | 119 | */ 120 | 121 | 'maintenance' => [ 122 | 'driver' => env('APP_MAINTENANCE_DRIVER', 'file'), 123 | 'store' => env('APP_MAINTENANCE_STORE', 'database'), 124 | ], 125 | 126 | ]; 127 | -------------------------------------------------------------------------------- /config/auth.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'guard' => env('AUTH_GUARD', 'web'), 18 | 'passwords' => env('AUTH_PASSWORD_BROKER', '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 | | which utilizes session storage plus the Eloquent user provider. 29 | | 30 | | All authentication guards have a user provider, which defines how the 31 | | users are actually retrieved out of your database or other storage 32 | | system used by the application. Typically, Eloquent is utilized. 33 | | 34 | | Supported: "session" 35 | | 36 | */ 37 | 38 | 'guards' => [ 39 | 'web' => [ 40 | 'driver' => 'session', 41 | 'provider' => 'users', 42 | ], 43 | ], 44 | 45 | /* 46 | |-------------------------------------------------------------------------- 47 | | User Providers 48 | |-------------------------------------------------------------------------- 49 | | 50 | | All authentication guards have a user provider, which defines how the 51 | | users are actually retrieved out of your database or other storage 52 | | system used by the application. Typically, Eloquent is utilized. 53 | | 54 | | If you have multiple user tables or models you may configure multiple 55 | | providers to represent the model / table. These providers may then 56 | | be assigned to any extra authentication guards you have defined. 57 | | 58 | | Supported: "database", "eloquent" 59 | | 60 | */ 61 | 62 | 'providers' => [ 63 | 'users' => [ 64 | 'driver' => 'eloquent', 65 | 'model' => env('AUTH_MODEL', App\Models\User::class), 66 | ], 67 | 68 | // 'users' => [ 69 | // 'driver' => 'database', 70 | // 'table' => 'users', 71 | // ], 72 | ], 73 | 74 | /* 75 | |-------------------------------------------------------------------------- 76 | | Resetting Passwords 77 | |-------------------------------------------------------------------------- 78 | | 79 | | These configuration options specify the behavior of Laravel's password 80 | | reset functionality, including the table utilized for token storage 81 | | and the user provider that is invoked to actually retrieve users. 82 | | 83 | | The expiry time is the number of minutes that each reset token will be 84 | | considered valid. This security feature keeps tokens short-lived so 85 | | they have less time to be guessed. You may change this as needed. 86 | | 87 | | The throttle setting is the number of seconds a user must wait before 88 | | generating more password reset tokens. This prevents the user from 89 | | quickly generating a very large amount of password reset tokens. 90 | | 91 | */ 92 | 93 | 'passwords' => [ 94 | 'users' => [ 95 | 'provider' => 'users', 96 | 'table' => env('AUTH_PASSWORD_RESET_TOKEN_TABLE', 'password_reset_tokens'), 97 | 'expire' => 60, 98 | 'throttle' => 60, 99 | ], 100 | ], 101 | 102 | /* 103 | |-------------------------------------------------------------------------- 104 | | Password Confirmation Timeout 105 | |-------------------------------------------------------------------------- 106 | | 107 | | Here you may define the amount of seconds before a password confirmation 108 | | window expires and users are asked to re-enter their password via the 109 | | confirmation screen. By default, the timeout lasts for three hours. 110 | | 111 | */ 112 | 113 | 'password_timeout' => env('AUTH_PASSWORD_TIMEOUT', 10800), 114 | 115 | ]; 116 | -------------------------------------------------------------------------------- /config/cache.php: -------------------------------------------------------------------------------- 1 | env('CACHE_STORE', 'database'), 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: "array", "database", "file", "memcached", 30 | | "redis", "dynamodb", "octane", "null" 31 | | 32 | */ 33 | 34 | 'stores' => [ 35 | 36 | 'array' => [ 37 | 'driver' => 'array', 38 | 'serialize' => false, 39 | ], 40 | 41 | 'database' => [ 42 | 'driver' => 'database', 43 | 'connection' => env('DB_CACHE_CONNECTION'), 44 | 'table' => env('DB_CACHE_TABLE', 'cache'), 45 | 'lock_connection' => env('DB_CACHE_LOCK_CONNECTION'), 46 | 'lock_table' => env('DB_CACHE_LOCK_TABLE'), 47 | ], 48 | 49 | 'file' => [ 50 | 'driver' => 'file', 51 | 'path' => storage_path('framework/cache/data'), 52 | 'lock_path' => storage_path('framework/cache/data'), 53 | ], 54 | 55 | 'memcached' => [ 56 | 'driver' => 'memcached', 57 | 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), 58 | 'sasl' => [ 59 | env('MEMCACHED_USERNAME'), 60 | env('MEMCACHED_PASSWORD'), 61 | ], 62 | 'options' => [ 63 | // Memcached::OPT_CONNECT_TIMEOUT => 2000, 64 | ], 65 | 'servers' => [ 66 | [ 67 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'), 68 | 'port' => env('MEMCACHED_PORT', 11211), 69 | 'weight' => 100, 70 | ], 71 | ], 72 | ], 73 | 74 | 'redis' => [ 75 | 'driver' => 'redis', 76 | 'connection' => env('REDIS_CACHE_CONNECTION', 'cache'), 77 | 'lock_connection' => env('REDIS_CACHE_LOCK_CONNECTION', 'default'), 78 | ], 79 | 80 | 'dynamodb' => [ 81 | 'driver' => 'dynamodb', 82 | 'key' => env('AWS_ACCESS_KEY_ID'), 83 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 84 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 85 | 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), 86 | 'endpoint' => env('DYNAMODB_ENDPOINT'), 87 | ], 88 | 89 | 'octane' => [ 90 | 'driver' => 'octane', 91 | ], 92 | 93 | ], 94 | 95 | /* 96 | |-------------------------------------------------------------------------- 97 | | Cache Key Prefix 98 | |-------------------------------------------------------------------------- 99 | | 100 | | When utilizing the APC, database, memcached, Redis, and DynamoDB cache 101 | | stores, there might be other applications using the same cache. For 102 | | that reason, you may prefix every cache key to avoid collisions. 103 | | 104 | */ 105 | 106 | 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'), 107 | 108 | ]; 109 | -------------------------------------------------------------------------------- /config/database.php: -------------------------------------------------------------------------------- 1 | env('DB_CONNECTION', 'sqlite'), 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Database Connections 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Below are all of the database connections defined for your application. 27 | | An example configuration is provided for each database system which 28 | | is supported by Laravel. You're free to add / remove connections. 29 | | 30 | */ 31 | 32 | 'connections' => [ 33 | 34 | 'sqlite' => [ 35 | 'driver' => 'sqlite', 36 | 'url' => env('DB_URL'), 37 | 'database' => env('DB_DATABASE', database_path('database.sqlite')), 38 | 'prefix' => '', 39 | 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), 40 | 'busy_timeout' => null, 41 | 'journal_mode' => null, 42 | 'synchronous' => null, 43 | ], 44 | 45 | 'mysql' => [ 46 | 'driver' => 'mysql', 47 | 'url' => env('DB_URL'), 48 | 'host' => env('DB_HOST', '127.0.0.1'), 49 | 'port' => env('DB_PORT', '3306'), 50 | 'database' => env('DB_DATABASE', 'laravel'), 51 | 'username' => env('DB_USERNAME', 'root'), 52 | 'password' => env('DB_PASSWORD', ''), 53 | 'unix_socket' => env('DB_SOCKET', ''), 54 | 'charset' => env('DB_CHARSET', 'utf8mb4'), 55 | 'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'), 56 | 'prefix' => '', 57 | 'prefix_indexes' => true, 58 | 'strict' => true, 59 | 'engine' => null, 60 | 'options' => extension_loaded('pdo_mysql') ? array_filter([ 61 | PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), 62 | ]) : [], 63 | ], 64 | 65 | 'mariadb' => [ 66 | 'driver' => 'mariadb', 67 | 'url' => env('DB_URL'), 68 | 'host' => env('DB_HOST', '127.0.0.1'), 69 | 'port' => env('DB_PORT', '3306'), 70 | 'database' => env('DB_DATABASE', 'laravel'), 71 | 'username' => env('DB_USERNAME', 'root'), 72 | 'password' => env('DB_PASSWORD', ''), 73 | 'unix_socket' => env('DB_SOCKET', ''), 74 | 'charset' => env('DB_CHARSET', 'utf8mb4'), 75 | 'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'), 76 | 'prefix' => '', 77 | 'prefix_indexes' => true, 78 | 'strict' => true, 79 | 'engine' => null, 80 | 'options' => extension_loaded('pdo_mysql') ? array_filter([ 81 | PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), 82 | ]) : [], 83 | ], 84 | 85 | 'pgsql' => [ 86 | 'driver' => 'pgsql', 87 | 'url' => env('DB_URL'), 88 | 'host' => env('DB_HOST', '127.0.0.1'), 89 | 'port' => env('DB_PORT', '5432'), 90 | 'database' => env('DB_DATABASE', 'laravel'), 91 | 'username' => env('DB_USERNAME', 'root'), 92 | 'password' => env('DB_PASSWORD', ''), 93 | 'charset' => env('DB_CHARSET', 'utf8'), 94 | 'prefix' => '', 95 | 'prefix_indexes' => true, 96 | 'search_path' => 'public', 97 | 'sslmode' => 'prefer', 98 | ], 99 | 100 | 'sqlsrv' => [ 101 | 'driver' => 'sqlsrv', 102 | 'url' => env('DB_URL'), 103 | 'host' => env('DB_HOST', 'localhost'), 104 | 'port' => env('DB_PORT', '1433'), 105 | 'database' => env('DB_DATABASE', 'laravel'), 106 | 'username' => env('DB_USERNAME', 'root'), 107 | 'password' => env('DB_PASSWORD', ''), 108 | 'charset' => env('DB_CHARSET', 'utf8'), 109 | 'prefix' => '', 110 | 'prefix_indexes' => true, 111 | // 'encrypt' => env('DB_ENCRYPT', 'yes'), 112 | // 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'), 113 | ], 114 | 115 | ], 116 | 117 | /* 118 | |-------------------------------------------------------------------------- 119 | | Migration Repository Table 120 | |-------------------------------------------------------------------------- 121 | | 122 | | This table keeps track of all the migrations that have already run for 123 | | your application. Using this information, we can determine which of 124 | | the migrations on disk haven't actually been run on the database. 125 | | 126 | */ 127 | 128 | 'migrations' => [ 129 | 'table' => 'migrations', 130 | 'update_date_on_publish' => true, 131 | ], 132 | 133 | /* 134 | |-------------------------------------------------------------------------- 135 | | Redis Databases 136 | |-------------------------------------------------------------------------- 137 | | 138 | | Redis is an open source, fast, and advanced key-value store that also 139 | | provides a richer body of commands than a typical key-value system 140 | | such as Memcached. You may define your connection settings here. 141 | | 142 | */ 143 | 144 | 'redis' => [ 145 | 146 | 'client' => env('REDIS_CLIENT', 'phpredis'), 147 | 148 | 'options' => [ 149 | 'cluster' => env('REDIS_CLUSTER', 'redis'), 150 | 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'), 151 | 'persistent' => env('REDIS_PERSISTENT', false), 152 | ], 153 | 154 | 'default' => [ 155 | 'url' => env('REDIS_URL'), 156 | 'host' => env('REDIS_HOST', '127.0.0.1'), 157 | 'username' => env('REDIS_USERNAME'), 158 | 'password' => env('REDIS_PASSWORD'), 159 | 'port' => env('REDIS_PORT', '6379'), 160 | 'database' => env('REDIS_DB', '0'), 161 | ], 162 | 163 | 'cache' => [ 164 | 'url' => env('REDIS_URL'), 165 | 'host' => env('REDIS_HOST', '127.0.0.1'), 166 | 'username' => env('REDIS_USERNAME'), 167 | 'password' => env('REDIS_PASSWORD'), 168 | 'port' => env('REDIS_PORT', '6379'), 169 | 'database' => env('REDIS_CACHE_DB', '1'), 170 | ], 171 | 172 | ], 173 | 174 | ]; 175 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | env('FILESYSTEM_DISK', 'local'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Filesystem Disks 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Below you may configure as many filesystem disks as necessary, and you 24 | | may even configure multiple disks for the same driver. Examples for 25 | | most supported storage drivers are configured here for reference. 26 | | 27 | | Supported drivers: "local", "ftp", "sftp", "s3" 28 | | 29 | */ 30 | 31 | 'disks' => [ 32 | 33 | 'local' => [ 34 | 'driver' => 'local', 35 | 'root' => storage_path('app/private'), 36 | 'serve' => true, 37 | 'throw' => false, 38 | 'report' => false, 39 | ], 40 | 41 | 'public' => [ 42 | 'driver' => 'local', 43 | 'root' => storage_path('app/public'), 44 | 'url' => env('APP_URL').'/storage', 45 | 'visibility' => 'public', 46 | 'throw' => false, 47 | 'report' => false, 48 | ], 49 | 50 | 's3' => [ 51 | 'driver' => 's3', 52 | 'key' => env('AWS_ACCESS_KEY_ID'), 53 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 54 | 'region' => env('AWS_DEFAULT_REGION'), 55 | 'bucket' => env('AWS_BUCKET'), 56 | 'url' => env('AWS_URL'), 57 | 'endpoint' => env('AWS_ENDPOINT'), 58 | 'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false), 59 | 'throw' => false, 60 | 'report' => false, 61 | ], 62 | 63 | ], 64 | 65 | /* 66 | |-------------------------------------------------------------------------- 67 | | Symbolic Links 68 | |-------------------------------------------------------------------------- 69 | | 70 | | Here you may configure the symbolic links that will be created when the 71 | | `storage:link` Artisan command is executed. The array keys should be 72 | | the locations of the links and the values should be their targets. 73 | | 74 | */ 75 | 76 | 'links' => [ 77 | public_path('storage') => storage_path('app/public'), 78 | ], 79 | 80 | ]; 81 | -------------------------------------------------------------------------------- /config/logging.php: -------------------------------------------------------------------------------- 1 | env('LOG_CHANNEL', 'stack'), 22 | 23 | /* 24 | |-------------------------------------------------------------------------- 25 | | Deprecations Log Channel 26 | |-------------------------------------------------------------------------- 27 | | 28 | | This option controls the log channel that should be used to log warnings 29 | | regarding deprecated PHP and library features. This allows you to get 30 | | your application ready for upcoming major versions of dependencies. 31 | | 32 | */ 33 | 34 | 'deprecations' => [ 35 | 'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'), 36 | 'trace' => env('LOG_DEPRECATIONS_TRACE', false), 37 | ], 38 | 39 | /* 40 | |-------------------------------------------------------------------------- 41 | | Log Channels 42 | |-------------------------------------------------------------------------- 43 | | 44 | | Here you may configure the log channels for your application. Laravel 45 | | utilizes the Monolog PHP logging library, which includes a variety 46 | | of powerful log handlers and formatters that you're free to use. 47 | | 48 | | Available drivers: "single", "daily", "slack", "syslog", 49 | | "errorlog", "monolog", "custom", "stack" 50 | | 51 | */ 52 | 53 | 'channels' => [ 54 | 55 | 'stack' => [ 56 | 'driver' => 'stack', 57 | 'channels' => explode(',', env('LOG_STACK', 'single')), 58 | 'ignore_exceptions' => false, 59 | ], 60 | 61 | 'single' => [ 62 | 'driver' => 'single', 63 | 'path' => storage_path('logs/laravel.log'), 64 | 'level' => env('LOG_LEVEL', 'debug'), 65 | 'replace_placeholders' => true, 66 | ], 67 | 68 | 'daily' => [ 69 | 'driver' => 'daily', 70 | 'path' => storage_path('logs/laravel.log'), 71 | 'level' => env('LOG_LEVEL', 'debug'), 72 | 'days' => env('LOG_DAILY_DAYS', 14), 73 | 'replace_placeholders' => true, 74 | ], 75 | 76 | 'slack' => [ 77 | 'driver' => 'slack', 78 | 'url' => env('LOG_SLACK_WEBHOOK_URL'), 79 | 'username' => env('LOG_SLACK_USERNAME', 'Laravel Log'), 80 | 'emoji' => env('LOG_SLACK_EMOJI', ':boom:'), 81 | 'level' => env('LOG_LEVEL', 'critical'), 82 | 'replace_placeholders' => true, 83 | ], 84 | 85 | 'papertrail' => [ 86 | 'driver' => 'monolog', 87 | 'level' => env('LOG_LEVEL', 'debug'), 88 | 'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class), 89 | 'handler_with' => [ 90 | 'host' => env('PAPERTRAIL_URL'), 91 | 'port' => env('PAPERTRAIL_PORT'), 92 | 'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'), 93 | ], 94 | 'processors' => [PsrLogMessageProcessor::class], 95 | ], 96 | 97 | 'stderr' => [ 98 | 'driver' => 'monolog', 99 | 'level' => env('LOG_LEVEL', 'debug'), 100 | 'handler' => StreamHandler::class, 101 | 'handler_with' => [ 102 | 'stream' => 'php://stderr', 103 | ], 104 | 'formatter' => env('LOG_STDERR_FORMATTER'), 105 | 'processors' => [PsrLogMessageProcessor::class], 106 | ], 107 | 108 | 'syslog' => [ 109 | 'driver' => 'syslog', 110 | 'level' => env('LOG_LEVEL', 'debug'), 111 | 'facility' => env('LOG_SYSLOG_FACILITY', LOG_USER), 112 | 'replace_placeholders' => true, 113 | ], 114 | 115 | 'errorlog' => [ 116 | 'driver' => 'errorlog', 117 | 'level' => env('LOG_LEVEL', 'debug'), 118 | 'replace_placeholders' => true, 119 | ], 120 | 121 | 'null' => [ 122 | 'driver' => 'monolog', 123 | 'handler' => NullHandler::class, 124 | ], 125 | 126 | 'emergency' => [ 127 | 'path' => storage_path('logs/laravel.log'), 128 | ], 129 | 130 | ], 131 | 132 | ]; 133 | -------------------------------------------------------------------------------- /config/mail.php: -------------------------------------------------------------------------------- 1 | env('MAIL_MAILER', 'log'), 18 | 19 | /* 20 | |-------------------------------------------------------------------------- 21 | | Mailer Configurations 22 | |-------------------------------------------------------------------------- 23 | | 24 | | Here you may configure all of the mailers used by your application plus 25 | | their respective settings. Several examples have been configured for 26 | | you and you are free to add your own as your application requires. 27 | | 28 | | Laravel supports a variety of mail "transport" drivers that can be used 29 | | when delivering an email. You may specify which one you're using for 30 | | your mailers below. You may also add additional mailers if needed. 31 | | 32 | | Supported: "smtp", "sendmail", "mailgun", "ses", "ses-v2", 33 | | "postmark", "resend", "log", "array", 34 | | "failover", "roundrobin" 35 | | 36 | */ 37 | 38 | 'mailers' => [ 39 | 40 | 'smtp' => [ 41 | 'transport' => 'smtp', 42 | 'scheme' => env('MAIL_SCHEME'), 43 | 'url' => env('MAIL_URL'), 44 | 'host' => env('MAIL_HOST', '127.0.0.1'), 45 | 'port' => env('MAIL_PORT', 2525), 46 | 'username' => env('MAIL_USERNAME'), 47 | 'password' => env('MAIL_PASSWORD'), 48 | 'timeout' => null, 49 | 'local_domain' => env('MAIL_EHLO_DOMAIN', parse_url(env('APP_URL', 'http://localhost'), PHP_URL_HOST)), 50 | ], 51 | 52 | 'ses' => [ 53 | 'transport' => 'ses', 54 | ], 55 | 56 | 'postmark' => [ 57 | 'transport' => 'postmark', 58 | // 'message_stream_id' => env('POSTMARK_MESSAGE_STREAM_ID'), 59 | // 'client' => [ 60 | // 'timeout' => 5, 61 | // ], 62 | ], 63 | 64 | 'resend' => [ 65 | 'transport' => 'resend', 66 | ], 67 | 68 | 'sendmail' => [ 69 | 'transport' => 'sendmail', 70 | 'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'), 71 | ], 72 | 73 | 'log' => [ 74 | 'transport' => 'log', 75 | 'channel' => env('MAIL_LOG_CHANNEL'), 76 | ], 77 | 78 | 'array' => [ 79 | 'transport' => 'array', 80 | ], 81 | 82 | 'failover' => [ 83 | 'transport' => 'failover', 84 | 'mailers' => [ 85 | 'smtp', 86 | 'log', 87 | ], 88 | ], 89 | 90 | 'roundrobin' => [ 91 | 'transport' => 'roundrobin', 92 | 'mailers' => [ 93 | 'ses', 94 | 'postmark', 95 | ], 96 | ], 97 | 98 | ], 99 | 100 | /* 101 | |-------------------------------------------------------------------------- 102 | | Global "From" Address 103 | |-------------------------------------------------------------------------- 104 | | 105 | | You may wish for all emails sent by your application to be sent from 106 | | the same address. Here you may specify a name and address that is 107 | | used globally for all emails that are sent by your application. 108 | | 109 | */ 110 | 111 | 'from' => [ 112 | 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), 113 | 'name' => env('MAIL_FROM_NAME', 'Example'), 114 | ], 115 | 116 | ]; 117 | -------------------------------------------------------------------------------- /config/queue.php: -------------------------------------------------------------------------------- 1 | env('QUEUE_CONNECTION', 'database'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Queue Connections 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure the connection options for every queue backend 24 | | used by your application. An example configuration is provided for 25 | | each backend supported by Laravel. You're also 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 | 'connection' => env('DB_QUEUE_CONNECTION'), 40 | 'table' => env('DB_QUEUE_TABLE', 'jobs'), 41 | 'queue' => env('DB_QUEUE', 'default'), 42 | 'retry_after' => (int) env('DB_QUEUE_RETRY_AFTER', 90), 43 | 'after_commit' => false, 44 | ], 45 | 46 | 'beanstalkd' => [ 47 | 'driver' => 'beanstalkd', 48 | 'host' => env('BEANSTALKD_QUEUE_HOST', 'localhost'), 49 | 'queue' => env('BEANSTALKD_QUEUE', 'default'), 50 | 'retry_after' => (int) env('BEANSTALKD_QUEUE_RETRY_AFTER', 90), 51 | 'block_for' => 0, 52 | 'after_commit' => false, 53 | ], 54 | 55 | 'sqs' => [ 56 | 'driver' => 'sqs', 57 | 'key' => env('AWS_ACCESS_KEY_ID'), 58 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 59 | 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), 60 | 'queue' => env('SQS_QUEUE', 'default'), 61 | 'suffix' => env('SQS_SUFFIX'), 62 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 63 | 'after_commit' => false, 64 | ], 65 | 66 | 'redis' => [ 67 | 'driver' => 'redis', 68 | 'connection' => env('REDIS_QUEUE_CONNECTION', 'default'), 69 | 'queue' => env('REDIS_QUEUE', 'default'), 70 | 'retry_after' => (int) env('REDIS_QUEUE_RETRY_AFTER', 90), 71 | 'block_for' => null, 72 | 'after_commit' => false, 73 | ], 74 | 75 | ], 76 | 77 | /* 78 | |-------------------------------------------------------------------------- 79 | | Job Batching 80 | |-------------------------------------------------------------------------- 81 | | 82 | | The following options configure the database and table that store job 83 | | batching information. These options can be updated to any database 84 | | connection and table which has been defined by your application. 85 | | 86 | */ 87 | 88 | 'batching' => [ 89 | 'database' => env('DB_CONNECTION', 'sqlite'), 90 | 'table' => 'job_batches', 91 | ], 92 | 93 | /* 94 | |-------------------------------------------------------------------------- 95 | | Failed Queue Jobs 96 | |-------------------------------------------------------------------------- 97 | | 98 | | These options configure the behavior of failed queue job logging so you 99 | | can control how and where failed jobs are stored. Laravel ships with 100 | | support for storing failed jobs in a simple file or in a database. 101 | | 102 | | Supported drivers: "database-uuids", "dynamodb", "file", "null" 103 | | 104 | */ 105 | 106 | 'failed' => [ 107 | 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'), 108 | 'database' => env('DB_CONNECTION', 'sqlite'), 109 | 'table' => 'failed_jobs', 110 | ], 111 | 112 | ]; 113 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'token' => env('POSTMARK_TOKEN'), 19 | ], 20 | 21 | 'ses' => [ 22 | 'key' => env('AWS_ACCESS_KEY_ID'), 23 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 24 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 25 | ], 26 | 27 | 'resend' => [ 28 | 'key' => env('RESEND_KEY'), 29 | ], 30 | 31 | 'slack' => [ 32 | 'notifications' => [ 33 | 'bot_user_oauth_token' => env('SLACK_BOT_USER_OAUTH_TOKEN'), 34 | 'channel' => env('SLACK_BOT_USER_DEFAULT_CHANNEL'), 35 | ], 36 | ], 37 | 38 | ]; 39 | -------------------------------------------------------------------------------- /config/session.php: -------------------------------------------------------------------------------- 1 | env('SESSION_DRIVER', 'database'), 22 | 23 | /* 24 | |-------------------------------------------------------------------------- 25 | | Session Lifetime 26 | |-------------------------------------------------------------------------- 27 | | 28 | | Here you may specify the number of minutes that you wish the session 29 | | to be allowed to remain idle before it expires. If you want them 30 | | to expire immediately when the browser is closed then you may 31 | | indicate that via the expire_on_close configuration option. 32 | | 33 | */ 34 | 35 | 'lifetime' => (int) env('SESSION_LIFETIME', 120), 36 | 37 | 'expire_on_close' => env('SESSION_EXPIRE_ON_CLOSE', false), 38 | 39 | /* 40 | |-------------------------------------------------------------------------- 41 | | Session Encryption 42 | |-------------------------------------------------------------------------- 43 | | 44 | | This option allows you to easily specify that all of your session data 45 | | should be encrypted before it's stored. All encryption is performed 46 | | automatically by Laravel and you may use the session like normal. 47 | | 48 | */ 49 | 50 | 'encrypt' => env('SESSION_ENCRYPT', false), 51 | 52 | /* 53 | |-------------------------------------------------------------------------- 54 | | Session File Location 55 | |-------------------------------------------------------------------------- 56 | | 57 | | When utilizing the "file" session driver, the session files are placed 58 | | on disk. The default storage location is defined here; however, you 59 | | are free to provide another location where they should be stored. 60 | | 61 | */ 62 | 63 | 'files' => storage_path('framework/sessions'), 64 | 65 | /* 66 | |-------------------------------------------------------------------------- 67 | | Session Database Connection 68 | |-------------------------------------------------------------------------- 69 | | 70 | | When using the "database" or "redis" session drivers, you may specify a 71 | | connection that should be used to manage these sessions. This should 72 | | correspond to a connection in your database configuration options. 73 | | 74 | */ 75 | 76 | 'connection' => env('SESSION_CONNECTION'), 77 | 78 | /* 79 | |-------------------------------------------------------------------------- 80 | | Session Database Table 81 | |-------------------------------------------------------------------------- 82 | | 83 | | When using the "database" session driver, you may specify the table to 84 | | be used to store sessions. Of course, a sensible default is defined 85 | | for you; however, you're welcome to change this to another table. 86 | | 87 | */ 88 | 89 | 'table' => env('SESSION_TABLE', 'sessions'), 90 | 91 | /* 92 | |-------------------------------------------------------------------------- 93 | | Session Cache Store 94 | |-------------------------------------------------------------------------- 95 | | 96 | | When using one of the framework's cache driven session backends, you may 97 | | define the cache store which should be used to store the session data 98 | | between requests. This must match one of your defined cache stores. 99 | | 100 | | Affects: "apc", "dynamodb", "memcached", "redis" 101 | | 102 | */ 103 | 104 | 'store' => env('SESSION_STORE'), 105 | 106 | /* 107 | |-------------------------------------------------------------------------- 108 | | Session Sweeping Lottery 109 | |-------------------------------------------------------------------------- 110 | | 111 | | Some session drivers must manually sweep their storage location to get 112 | | rid of old sessions from storage. Here are the chances that it will 113 | | happen on a given request. By default, the odds are 2 out of 100. 114 | | 115 | */ 116 | 117 | 'lottery' => [2, 100], 118 | 119 | /* 120 | |-------------------------------------------------------------------------- 121 | | Session Cookie Name 122 | |-------------------------------------------------------------------------- 123 | | 124 | | Here you may change the name of the session cookie that is created by 125 | | the framework. Typically, you should not need to change this value 126 | | since doing so does not grant a meaningful security improvement. 127 | | 128 | */ 129 | 130 | 'cookie' => env( 131 | 'SESSION_COOKIE', 132 | Str::slug(env('APP_NAME', 'laravel'), '_').'_session' 133 | ), 134 | 135 | /* 136 | |-------------------------------------------------------------------------- 137 | | Session Cookie Path 138 | |-------------------------------------------------------------------------- 139 | | 140 | | The session cookie path determines the path for which the cookie will 141 | | be regarded as available. Typically, this will be the root path of 142 | | your application, but you're free to change this when necessary. 143 | | 144 | */ 145 | 146 | 'path' => env('SESSION_PATH', '/'), 147 | 148 | /* 149 | |-------------------------------------------------------------------------- 150 | | Session Cookie Domain 151 | |-------------------------------------------------------------------------- 152 | | 153 | | This value determines the domain and subdomains the session cookie is 154 | | available to. By default, the cookie will be available to the root 155 | | domain and all subdomains. Typically, this shouldn't be changed. 156 | | 157 | */ 158 | 159 | 'domain' => env('SESSION_DOMAIN'), 160 | 161 | /* 162 | |-------------------------------------------------------------------------- 163 | | HTTPS Only Cookies 164 | |-------------------------------------------------------------------------- 165 | | 166 | | By setting this option to true, session cookies will only be sent back 167 | | to the server if the browser has a HTTPS connection. This will keep 168 | | the cookie from being sent to you when it can't be done securely. 169 | | 170 | */ 171 | 172 | 'secure' => env('SESSION_SECURE_COOKIE'), 173 | 174 | /* 175 | |-------------------------------------------------------------------------- 176 | | HTTP Access Only 177 | |-------------------------------------------------------------------------- 178 | | 179 | | Setting this value to true will prevent JavaScript from accessing the 180 | | value of the cookie and the cookie will only be accessible through 181 | | the HTTP protocol. It's unlikely you should disable this option. 182 | | 183 | */ 184 | 185 | 'http_only' => env('SESSION_HTTP_ONLY', true), 186 | 187 | /* 188 | |-------------------------------------------------------------------------- 189 | | Same-Site Cookies 190 | |-------------------------------------------------------------------------- 191 | | 192 | | This option determines how your cookies behave when cross-site requests 193 | | take place, and can be used to mitigate CSRF attacks. By default, we 194 | | will set this value to "lax" to permit secure cross-site requests. 195 | | 196 | | See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#samesitesamesite-value 197 | | 198 | | Supported: "lax", "strict", "none", null 199 | | 200 | */ 201 | 202 | 'same_site' => env('SESSION_SAME_SITE', 'lax'), 203 | 204 | /* 205 | |-------------------------------------------------------------------------- 206 | | Partitioned Cookies 207 | |-------------------------------------------------------------------------- 208 | | 209 | | Setting this value to true will tie the cookie to the top-level site for 210 | | a cross-site context. Partitioned cookies are accepted by the browser 211 | | when flagged "secure" and the Same-Site attribute is set to "none". 212 | | 213 | */ 214 | 215 | 'partitioned' => env('SESSION_PARTITIONED_COOKIE', false), 216 | 217 | ]; 218 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite* 2 | -------------------------------------------------------------------------------- /database/factories/UserFactory.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class UserFactory extends Factory 13 | { 14 | /** 15 | * The current password being used by the factory. 16 | */ 17 | protected static ?string $password; 18 | 19 | /** 20 | * Define the model's default state. 21 | * 22 | * @return array 23 | */ 24 | public function definition(): array 25 | { 26 | return [ 27 | 'name' => fake()->name(), 28 | 'email' => fake()->unique()->safeEmail(), 29 | 'email_verified_at' => now(), 30 | 'password' => static::$password ??= Hash::make('password'), 31 | 'remember_token' => Str::random(10), 32 | ]; 33 | } 34 | 35 | /** 36 | * Indicate that the model's email address should be unverified. 37 | */ 38 | public function unverified(): static 39 | { 40 | return $this->state(fn (array $attributes) => [ 41 | 'email_verified_at' => null, 42 | ]); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /database/migrations/0001_01_01_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->string('name'); 17 | $table->string('email')->unique(); 18 | $table->timestamp('email_verified_at')->nullable(); 19 | $table->string('password'); 20 | $table->rememberToken(); 21 | $table->timestamps(); 22 | }); 23 | 24 | Schema::create('password_reset_tokens', function (Blueprint $table) { 25 | $table->string('email')->primary(); 26 | $table->string('token'); 27 | $table->timestamp('created_at')->nullable(); 28 | }); 29 | 30 | Schema::create('sessions', function (Blueprint $table) { 31 | $table->string('id')->primary(); 32 | $table->foreignId('user_id')->nullable()->index(); 33 | $table->string('ip_address', 45)->nullable(); 34 | $table->text('user_agent')->nullable(); 35 | $table->longText('payload'); 36 | $table->integer('last_activity')->index(); 37 | }); 38 | } 39 | 40 | /** 41 | * Reverse the migrations. 42 | */ 43 | public function down(): void 44 | { 45 | Schema::dropIfExists('users'); 46 | Schema::dropIfExists('password_reset_tokens'); 47 | Schema::dropIfExists('sessions'); 48 | } 49 | }; 50 | -------------------------------------------------------------------------------- /database/migrations/0001_01_01_000001_create_cache_table.php: -------------------------------------------------------------------------------- 1 | string('key')->primary(); 16 | $table->mediumText('value'); 17 | $table->integer('expiration'); 18 | }); 19 | 20 | Schema::create('cache_locks', function (Blueprint $table) { 21 | $table->string('key')->primary(); 22 | $table->string('owner'); 23 | $table->integer('expiration'); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | */ 30 | public function down(): void 31 | { 32 | Schema::dropIfExists('cache'); 33 | Schema::dropIfExists('cache_locks'); 34 | } 35 | }; 36 | -------------------------------------------------------------------------------- /database/migrations/0001_01_01_000002_create_jobs_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->string('queue')->index(); 17 | $table->longText('payload'); 18 | $table->unsignedTinyInteger('attempts'); 19 | $table->unsignedInteger('reserved_at')->nullable(); 20 | $table->unsignedInteger('available_at'); 21 | $table->unsignedInteger('created_at'); 22 | }); 23 | 24 | Schema::create('job_batches', function (Blueprint $table) { 25 | $table->string('id')->primary(); 26 | $table->string('name'); 27 | $table->integer('total_jobs'); 28 | $table->integer('pending_jobs'); 29 | $table->integer('failed_jobs'); 30 | $table->longText('failed_job_ids'); 31 | $table->mediumText('options')->nullable(); 32 | $table->integer('cancelled_at')->nullable(); 33 | $table->integer('created_at'); 34 | $table->integer('finished_at')->nullable(); 35 | }); 36 | 37 | Schema::create('failed_jobs', function (Blueprint $table) { 38 | $table->id(); 39 | $table->string('uuid')->unique(); 40 | $table->text('connection'); 41 | $table->text('queue'); 42 | $table->longText('payload'); 43 | $table->longText('exception'); 44 | $table->timestamp('failed_at')->useCurrent(); 45 | }); 46 | } 47 | 48 | /** 49 | * Reverse the migrations. 50 | */ 51 | public function down(): void 52 | { 53 | Schema::dropIfExists('jobs'); 54 | Schema::dropIfExists('job_batches'); 55 | Schema::dropIfExists('failed_jobs'); 56 | } 57 | }; 58 | -------------------------------------------------------------------------------- /database/seeders/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | create(); 17 | 18 | User::factory()->create([ 19 | 'name' => 'Test User', 20 | 'email' => 'test@example.com', 21 | ]); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | 3 | #################################################################################################### 4 | # PHP 5 | #################################################################################################### 6 | php: 7 | build: .docker/php 8 | ports: 9 | - 5173:5173 10 | volumes: 11 | - .:/var/www:cached 12 | 13 | #################################################################################################### 14 | # Nginx 15 | #################################################################################################### 16 | nginx: 17 | image: nginx 18 | ports: 19 | - 80:80 20 | volumes: 21 | - .:/var/www 22 | - .docker/nginx/default.conf:/etc/nginx/conf.d/default.conf 23 | - .docker/nginx/nginx.conf:/etc/nginx/nginx.conf 24 | depends_on: 25 | - php 26 | 27 | #################################################################################################### 28 | # DATABASE (MySQL) 29 | #################################################################################################### 30 | db: 31 | image: mysql:8.1 32 | ports: 33 | - 3306:3306 34 | volumes: 35 | - .docker/db/data:/var/lib/mysql 36 | - .docker/logs:/var/log/mysql 37 | - .docker/db/my.cnf:/etc/mysql/conf.d/my.cnf 38 | - .docker/db/sql:/docker-entrypoint-initdb.d 39 | environment: 40 | MYSQL_ROOT_PASSWORD: root 41 | MYSQL_DATABASE: refactorian 42 | MYSQL_USER: refactorian 43 | MYSQL_PASSWORD: refactorian 44 | 45 | #################################################################################################### 46 | # phpMyAdmin 47 | #################################################################################################### 48 | phpmyadmin: 49 | image: phpmyadmin/phpmyadmin 50 | ports: 51 | - 8080:80 52 | links: 53 | - db 54 | environment: 55 | PMA_HOST: db 56 | PMA_PORT: 3306 57 | PMA_ARBITRARY: 1 58 | volumes: 59 | - .docker/phpmyadmin/sessions:/sessions 60 | 61 | #################################################################################################### 62 | # Adminer 63 | #################################################################################################### 64 | adminer: 65 | image: adminer 66 | ports: 67 | - 9090:8080 68 | depends_on: 69 | - db 70 | 71 | #################################################################################################### 72 | # Mailpit 73 | #################################################################################################### 74 | mail: 75 | image: axllent/mailpit:latest 76 | ports: 77 | - 8025:8025 78 | - 1025:1025 79 | 80 | #################################################################################################### 81 | # Redis 82 | #################################################################################################### 83 | redis: 84 | image: redis:latest 85 | command: redis-server --appendonly yes 86 | volumes: 87 | - .docker/redis/data:/data 88 | ports: 89 | - 6379:6379 90 | 91 | # #################################################################################################### 92 | # # DATABASE (MariaDB) 93 | # #################################################################################################### 94 | # db: 95 | # image: mariadb:10.11 96 | # ports: 97 | # - 3306:3306 98 | # volumes: 99 | # - .docker/db/data:/var/lib/mysql 100 | # - .docker/logs:/var/log/mysql 101 | # - .docker/db/my.cnf:/etc/mysql/conf.d/my.cnf 102 | # - .docker/db/sql:/docker-entrypoint-initdb.d 103 | # environment: 104 | # MYSQL_ROOT_PASSWORD: root 105 | # MYSQL_DATABASE: laravel_db_name 106 | # MYSQL_USER: laravel_db_user 107 | # MYSQL_PASSWORD: laravel_db_pass 108 | 109 | #################################################################################################### 110 | # PostgreSQL 111 | #################################################################################################### 112 | # db: 113 | # image: postgres:16 114 | # ports: 115 | # - 5432:5432 116 | # volumes: 117 | # - .docker/db/data:/var/lib/postgresql/data 118 | # - .docker/db/sql:/docker-entrypoint-initdb.d 119 | # environment: 120 | # - POSTGRES_USER=refactorian 121 | # - POSTGRES_PASSWORD=refactorian 122 | # - POSTGRES_DB=refactorian 123 | 124 | #################################################################################################### 125 | # pgAdmin 126 | #################################################################################################### 127 | # pgadmin: 128 | # image: dpage/pgadmin4 129 | # ports: 130 | # - 5050:80 131 | # environment: 132 | # - PGADMIN_DEFAULT_EMAIL=admin@admin.com 133 | # - PGADMIN_DEFAULT_PASSWORD=password 134 | # depends_on: 135 | # - db 136 | -------------------------------------------------------------------------------- /lang/en/auth.php: -------------------------------------------------------------------------------- 1 | 'These credentials do not match our records.', 17 | 'password' => 'The provided password is incorrect.', 18 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 19 | 20 | ]; 21 | -------------------------------------------------------------------------------- /lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | 'Your password has been reset.', 17 | 'sent' => 'We have emailed your password reset link.', 18 | 'throttled' => 'Please wait before retrying.', 19 | 'token' => 'This password reset token is invalid.', 20 | 'user' => "We can't find a user with that email address.", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /lang/en/validation.php: -------------------------------------------------------------------------------- 1 | 'The :attribute field must be accepted.', 17 | 'accepted_if' => 'The :attribute field must be accepted when :other is :value.', 18 | 'active_url' => 'The :attribute field must be a valid URL.', 19 | 'after' => 'The :attribute field must be a date after :date.', 20 | 'after_or_equal' => 'The :attribute field must be a date after or equal to :date.', 21 | 'alpha' => 'The :attribute field must only contain letters.', 22 | 'alpha_dash' => 'The :attribute field must only contain letters, numbers, dashes, and underscores.', 23 | 'alpha_num' => 'The :attribute field must only contain letters and numbers.', 24 | 'array' => 'The :attribute field must be an array.', 25 | 'ascii' => 'The :attribute field must only contain single-byte alphanumeric characters and symbols.', 26 | 'before' => 'The :attribute field must be a date before :date.', 27 | 'before_or_equal' => 'The :attribute field must be a date before or equal to :date.', 28 | 'between' => [ 29 | 'array' => 'The :attribute field must have between :min and :max items.', 30 | 'file' => 'The :attribute field must be between :min and :max kilobytes.', 31 | 'numeric' => 'The :attribute field must be between :min and :max.', 32 | 'string' => 'The :attribute field must be between :min and :max characters.', 33 | ], 34 | 'boolean' => 'The :attribute field must be true or false.', 35 | 'can' => 'The :attribute field contains an unauthorized value.', 36 | 'confirmed' => 'The :attribute field confirmation does not match.', 37 | 'contains' => 'The :attribute field is missing a required value.', 38 | 'current_password' => 'The password is incorrect.', 39 | 'date' => 'The :attribute field must be a valid date.', 40 | 'date_equals' => 'The :attribute field must be a date equal to :date.', 41 | 'date_format' => 'The :attribute field must match the format :format.', 42 | 'decimal' => 'The :attribute field must have :decimal decimal places.', 43 | 'declined' => 'The :attribute field must be declined.', 44 | 'declined_if' => 'The :attribute field must be declined when :other is :value.', 45 | 'different' => 'The :attribute field and :other must be different.', 46 | 'digits' => 'The :attribute field must be :digits digits.', 47 | 'digits_between' => 'The :attribute field must be between :min and :max digits.', 48 | 'dimensions' => 'The :attribute field has invalid image dimensions.', 49 | 'distinct' => 'The :attribute field has a duplicate value.', 50 | 'doesnt_end_with' => 'The :attribute field must not end with one of the following: :values.', 51 | 'doesnt_start_with' => 'The :attribute field must not start with one of the following: :values.', 52 | 'email' => 'The :attribute field must be a valid email address.', 53 | 'ends_with' => 'The :attribute field must end with one of the following: :values.', 54 | 'enum' => 'The selected :attribute is invalid.', 55 | 'exists' => 'The selected :attribute is invalid.', 56 | 'extensions' => 'The :attribute field must have one of the following extensions: :values.', 57 | 'file' => 'The :attribute field must be a file.', 58 | 'filled' => 'The :attribute field must have a value.', 59 | 'gt' => [ 60 | 'array' => 'The :attribute field must have more than :value items.', 61 | 'file' => 'The :attribute field must be greater than :value kilobytes.', 62 | 'numeric' => 'The :attribute field must be greater than :value.', 63 | 'string' => 'The :attribute field must be greater than :value characters.', 64 | ], 65 | 'gte' => [ 66 | 'array' => 'The :attribute field must have :value items or more.', 67 | 'file' => 'The :attribute field must be greater than or equal to :value kilobytes.', 68 | 'numeric' => 'The :attribute field must be greater than or equal to :value.', 69 | 'string' => 'The :attribute field must be greater than or equal to :value characters.', 70 | ], 71 | 'hex_color' => 'The :attribute field must be a valid hexadecimal color.', 72 | 'image' => 'The :attribute field must be an image.', 73 | 'in' => 'The selected :attribute is invalid.', 74 | 'in_array' => 'The :attribute field must exist in :other.', 75 | 'integer' => 'The :attribute field must be an integer.', 76 | 'ip' => 'The :attribute field must be a valid IP address.', 77 | 'ipv4' => 'The :attribute field must be a valid IPv4 address.', 78 | 'ipv6' => 'The :attribute field must be a valid IPv6 address.', 79 | 'json' => 'The :attribute field must be a valid JSON string.', 80 | 'list' => 'The :attribute field must be a list.', 81 | 'lowercase' => 'The :attribute field must be lowercase.', 82 | 'lt' => [ 83 | 'array' => 'The :attribute field must have less than :value items.', 84 | 'file' => 'The :attribute field must be less than :value kilobytes.', 85 | 'numeric' => 'The :attribute field must be less than :value.', 86 | 'string' => 'The :attribute field must be less than :value characters.', 87 | ], 88 | 'lte' => [ 89 | 'array' => 'The :attribute field must not have more than :value items.', 90 | 'file' => 'The :attribute field must be less than or equal to :value kilobytes.', 91 | 'numeric' => 'The :attribute field must be less than or equal to :value.', 92 | 'string' => 'The :attribute field must be less than or equal to :value characters.', 93 | ], 94 | 'mac_address' => 'The :attribute field must be a valid MAC address.', 95 | 'max' => [ 96 | 'array' => 'The :attribute field must not have more than :max items.', 97 | 'file' => 'The :attribute field must not be greater than :max kilobytes.', 98 | 'numeric' => 'The :attribute field must not be greater than :max.', 99 | 'string' => 'The :attribute field must not be greater than :max characters.', 100 | ], 101 | 'max_digits' => 'The :attribute field must not have more than :max digits.', 102 | 'mimes' => 'The :attribute field must be a file of type: :values.', 103 | 'mimetypes' => 'The :attribute field must be a file of type: :values.', 104 | 'min' => [ 105 | 'array' => 'The :attribute field must have at least :min items.', 106 | 'file' => 'The :attribute field must be at least :min kilobytes.', 107 | 'numeric' => 'The :attribute field must be at least :min.', 108 | 'string' => 'The :attribute field must be at least :min characters.', 109 | ], 110 | 'min_digits' => 'The :attribute field must have at least :min digits.', 111 | 'missing' => 'The :attribute field must be missing.', 112 | 'missing_if' => 'The :attribute field must be missing when :other is :value.', 113 | 'missing_unless' => 'The :attribute field must be missing unless :other is :value.', 114 | 'missing_with' => 'The :attribute field must be missing when :values is present.', 115 | 'missing_with_all' => 'The :attribute field must be missing when :values are present.', 116 | 'multiple_of' => 'The :attribute field must be a multiple of :value.', 117 | 'not_in' => 'The selected :attribute is invalid.', 118 | 'not_regex' => 'The :attribute field format is invalid.', 119 | 'numeric' => 'The :attribute field must be a number.', 120 | 'password' => [ 121 | 'letters' => 'The :attribute field must contain at least one letter.', 122 | 'mixed' => 'The :attribute field must contain at least one uppercase and one lowercase letter.', 123 | 'numbers' => 'The :attribute field must contain at least one number.', 124 | 'symbols' => 'The :attribute field must contain at least one symbol.', 125 | 'uncompromised' => 'The given :attribute has appeared in a data leak. Please choose a different :attribute.', 126 | ], 127 | 'present' => 'The :attribute field must be present.', 128 | 'present_if' => 'The :attribute field must be present when :other is :value.', 129 | 'present_unless' => 'The :attribute field must be present unless :other is :value.', 130 | 'present_with' => 'The :attribute field must be present when :values is present.', 131 | 'present_with_all' => 'The :attribute field must be present when :values are present.', 132 | 'prohibited' => 'The :attribute field is prohibited.', 133 | 'prohibited_if' => 'The :attribute field is prohibited when :other is :value.', 134 | 'prohibited_if_accepted' => 'The :attribute field is prohibited when :other is accepted.', 135 | 'prohibited_if_declined' => 'The :attribute field is prohibited when :other is declined.', 136 | 'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.', 137 | 'prohibits' => 'The :attribute field prohibits :other from being present.', 138 | 'regex' => 'The :attribute field format is invalid.', 139 | 'required' => 'The :attribute field is required.', 140 | 'required_array_keys' => 'The :attribute field must contain entries for: :values.', 141 | 'required_if' => 'The :attribute field is required when :other is :value.', 142 | 'required_if_accepted' => 'The :attribute field is required when :other is accepted.', 143 | 'required_if_declined' => 'The :attribute field is required when :other is declined.', 144 | 'required_unless' => 'The :attribute field is required unless :other is in :values.', 145 | 'required_with' => 'The :attribute field is required when :values is present.', 146 | 'required_with_all' => 'The :attribute field is required when :values are present.', 147 | 'required_without' => 'The :attribute field is required when :values is not present.', 148 | 'required_without_all' => 'The :attribute field is required when none of :values are present.', 149 | 'same' => 'The :attribute field must match :other.', 150 | 'size' => [ 151 | 'array' => 'The :attribute field must contain :size items.', 152 | 'file' => 'The :attribute field must be :size kilobytes.', 153 | 'numeric' => 'The :attribute field must be :size.', 154 | 'string' => 'The :attribute field must be :size characters.', 155 | ], 156 | 'starts_with' => 'The :attribute field must start with one of the following: :values.', 157 | 'string' => 'The :attribute field must be a string.', 158 | 'timezone' => 'The :attribute field must be a valid timezone.', 159 | 'unique' => 'The :attribute has already been taken.', 160 | 'uploaded' => 'The :attribute failed to upload.', 161 | 'uppercase' => 'The :attribute field must be uppercase.', 162 | 'url' => 'The :attribute field must be a valid URL.', 163 | 'ulid' => 'The :attribute field must be a valid ULID.', 164 | 'uuid' => 'The :attribute field must be a valid UUID.', 165 | 166 | /* 167 | |-------------------------------------------------------------------------- 168 | | Custom Validation Language Lines 169 | |-------------------------------------------------------------------------- 170 | | 171 | | Here you may specify custom validation messages for attributes using the 172 | | convention "attribute.rule" to name the lines. This makes it quick to 173 | | specify a specific custom language line for a given attribute rule. 174 | | 175 | */ 176 | 177 | 'custom' => [ 178 | 'attribute-name' => [ 179 | 'rule-name' => 'custom-message', 180 | ], 181 | ], 182 | 183 | /* 184 | |-------------------------------------------------------------------------- 185 | | Custom Validation Attributes 186 | |-------------------------------------------------------------------------- 187 | | 188 | | The following language lines are used to swap our attribute placeholder 189 | | with something more reader friendly such as "E-Mail Address" instead 190 | | of "email". This simply helps us make our message more expressive. 191 | | 192 | */ 193 | 194 | 'attributes' => [], 195 | 196 | ]; 197 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "type": "module", 4 | "scripts": { 5 | "build": "vite build", 6 | "dev": "vite" 7 | }, 8 | "devDependencies": { 9 | "@tailwindcss/vite": "^4.1.4", 10 | "axios": "^1.9.0", 11 | "concurrently": "^9.0.1", 12 | "laravel-vite-plugin": "^1.2.0", 13 | "tailwindcss": "^4.0.0", 14 | "vite": "^6.3.4" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | tests/Unit 10 | 11 | 12 | tests/Feature 13 | 14 | 15 | 16 | 17 | app 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews -Indexes 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Handle Authorization Header 9 | RewriteCond %{HTTP:Authorization} . 10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 11 | 12 | # Handle X-XSRF-Token Header 13 | RewriteCond %{HTTP:x-xsrf-token} . 14 | RewriteRule .* - [E=HTTP_X_XSRF_TOKEN:%{HTTP:X-XSRF-Token}] 15 | 16 | # Redirect Trailing Slashes If Not A Folder... 17 | RewriteCond %{REQUEST_FILENAME} !-d 18 | RewriteCond %{REQUEST_URI} (.+)/$ 19 | RewriteRule ^ %1 [L,R=301] 20 | 21 | # Send Requests To Front Controller... 22 | RewriteCond %{REQUEST_FILENAME} !-d 23 | RewriteCond %{REQUEST_FILENAME} !-f 24 | RewriteRule ^ index.php [L] 25 | 26 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/refactorian/laravel-docker/33da777904e5dffffdb8aef2dc5a125f3139b235/public/favicon.ico -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | handleRequest(Request::capture()); 21 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /rector.php: -------------------------------------------------------------------------------- 1 | withPaths([ 13 | __DIR__.'/app', 14 | // __DIR__.'/bootstrap', 15 | // __DIR__.'/config', 16 | // __DIR__.'/lang', 17 | // __DIR__.'/public', 18 | // __DIR__.'/resources', 19 | // __DIR__.'/routes', 20 | // __DIR__.'/tests', 21 | ]) 22 | ->withSets([ 23 | SetList::DEAD_CODE, 24 | LevelSetList::UP_TO_PHP_83, 25 | LaravelSetList::LARAVEL_110, 26 | ]) 27 | ->withRules([ 28 | AddVoidReturnTypeWhereNoReturnRector::class, 29 | ]); 30 | -------------------------------------------------------------------------------- /resources/css/app.css: -------------------------------------------------------------------------------- 1 | @import 'tailwindcss'; 2 | 3 | @source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php'; 4 | @source '../../storage/framework/views/*.php'; 5 | @source '../**/*.blade.php'; 6 | @source '../**/*.js'; 7 | 8 | @theme { 9 | --font-sans: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 10 | 'Segoe UI Symbol', 'Noto Color Emoji'; 11 | } 12 | -------------------------------------------------------------------------------- /resources/js/app.js: -------------------------------------------------------------------------------- 1 | import './bootstrap'; 2 | -------------------------------------------------------------------------------- /resources/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | window.axios = axios; 3 | 4 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 5 | -------------------------------------------------------------------------------- /resources/views/welcome.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Laravel 8 | 9 | 10 | 11 | 12 | 13 | 14 | @if (file_exists(public_path('build/manifest.json')) || file_exists(public_path('hot'))) 15 | @vite(['resources/css/app.css', 'resources/js/app.js']) 16 | @else 17 | 20 | @endif 21 | 22 | 23 |
24 | @if (Route::has('login')) 25 | 50 | @endif 51 |
52 |
53 |
54 |
55 |

Let's get started

56 |

Laravel has an incredibly rich ecosystem.
We suggest starting with the following.

57 | 113 | 120 |
121 |
122 | {{-- Laravel Logo --}} 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | {{-- Light Mode 12 SVG --}} 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | {{-- Dark Mode 12 SVG --}} 203 | 268 |
269 |
270 |
271 |
272 | 273 | @if (Route::has('login')) 274 | 275 | @endif 276 | 277 | 278 | -------------------------------------------------------------------------------- /routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 8 | })->purpose('Display an inspiring quote'); 9 | -------------------------------------------------------------------------------- /routes/web.php: -------------------------------------------------------------------------------- 1 | get('/'); 5 | 6 | $response->assertStatus(200); 7 | }); 8 | -------------------------------------------------------------------------------- /tests/Pest.php: -------------------------------------------------------------------------------- 1 | extend(Tests\TestCase::class) 15 | // ->use(Illuminate\Foundation\Testing\RefreshDatabase::class) 16 | ->in('Feature'); 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Expectations 21 | |-------------------------------------------------------------------------- 22 | | 23 | | When you're writing tests, you often need to check that values meet certain conditions. The 24 | | "expect()" function gives you access to a set of "expectations" methods that you can use 25 | | to assert different things. Of course, you may extend the Expectation API at any time. 26 | | 27 | */ 28 | 29 | expect()->extend('toBeOne', function () { 30 | return $this->toBe(1); 31 | }); 32 | 33 | /* 34 | |-------------------------------------------------------------------------- 35 | | Functions 36 | |-------------------------------------------------------------------------- 37 | | 38 | | While Pest is very powerful out-of-the-box, you may have some testing code specific to your 39 | | project that you don't want to repeat in every file. Here you can also expose helpers as 40 | | global functions to help you to reduce the number of lines of code in your test files. 41 | | 42 | */ 43 | 44 | function something() 45 | { 46 | // .. 47 | } 48 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | toBeTrue(); 5 | }); 6 | -------------------------------------------------------------------------------- /vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite'; 2 | import laravel from 'laravel-vite-plugin'; 3 | import tailwindcss from '@tailwindcss/vite'; 4 | 5 | export default defineConfig({ 6 | plugins: [ 7 | laravel({ 8 | input: ['resources/css/app.css', 'resources/js/app.js'], 9 | refresh: true, 10 | }), 11 | tailwindcss(), 12 | ], 13 | }); 14 | --------------------------------------------------------------------------------