├── .DS_Store
├── .ebextensions
└── cronjob.config
├── .editorconfig
├── .env.example
├── .gitattributes
├── .gitignore
├── .platform
├── .DS_Store
└── nginx
│ └── nginx.conf
├── .styleci.yml
├── README.md
├── app
├── Actions
│ ├── Fortify
│ │ ├── CreateNewUser.php
│ │ ├── PasswordValidationRules.php
│ │ ├── ResetUserPassword.php
│ │ ├── UpdateUserPassword.php
│ │ └── UpdateUserProfileInformation.php
│ └── Jetstream
│ │ └── DeleteUser.php
├── Console
│ └── Kernel.php
├── Exceptions
│ └── Handler.php
├── Http
│ ├── Controllers
│ │ └── Controller.php
│ ├── Kernel.php
│ └── Middleware
│ │ ├── Authenticate.php
│ │ ├── EncryptCookies.php
│ │ ├── PreventRequestsDuringMaintenance.php
│ │ ├── RedirectIfAuthenticated.php
│ │ ├── TrimStrings.php
│ │ ├── TrustHosts.php
│ │ ├── TrustProxies.php
│ │ └── VerifyCsrfToken.php
├── Logging
│ └── CloudWatchLoggerFactory.php
├── Mail
│ └── TestMail.php
├── Models
│ └── User.php
├── Providers
│ ├── AppServiceProvider.php
│ ├── AuthServiceProvider.php
│ ├── BroadcastServiceProvider.php
│ ├── EventServiceProvider.php
│ ├── FortifyServiceProvider.php
│ ├── JetstreamServiceProvider.php
│ └── RouteServiceProvider.php
└── View
│ └── Components
│ ├── AppLayout.php
│ └── GuestLayout.php
├── artisan
├── bootstrap
├── app.php
└── cache
│ └── .gitignore
├── composer.json
├── composer.lock
├── config
├── app.php
├── auth.php
├── backup.php
├── broadcasting.php
├── cache.php
├── cors.php
├── database.php
├── filesystems.php
├── fortify.php
├── hashing.php
├── jetstream.php
├── logging.php
├── mail.php
├── queue.php
├── sanctum.php
├── services.php
├── session.php
└── view.php
├── database
├── .gitignore
├── factories
│ └── UserFactory.php
├── migrations
│ ├── 2014_10_12_000000_create_users_table.php
│ ├── 2014_10_12_100000_create_password_resets_table.php
│ ├── 2014_10_12_200000_add_two_factor_columns_to_users_table.php
│ ├── 2019_08_19_000000_create_failed_jobs_table.php
│ ├── 2019_12_14_000001_create_personal_access_tokens_table.php
│ └── 2020_09_27_130242_create_sessions_table.php
└── seeders
│ └── DatabaseSeeder.php
├── package-lock.json
├── package.json
├── phpunit.xml
├── public
├── css
│ └── app.css
├── favicon.ico
├── index.php
├── js
│ └── app.js
├── mix-manifest.json
├── robots.txt
└── web.config
├── resources
├── css
│ └── app.css
├── js
│ ├── app.js
│ └── bootstrap.js
├── lang
│ ├── en
│ │ ├── auth.php
│ │ ├── pagination.php
│ │ ├── passwords.php
│ │ └── validation.php
│ └── vendor
│ │ └── backup
│ │ ├── ar
│ │ └── notifications.php
│ │ ├── cs
│ │ └── notifications.php
│ │ ├── da
│ │ └── notifications.php
│ │ ├── de
│ │ └── notifications.php
│ │ ├── en
│ │ └── notifications.php
│ │ ├── es
│ │ └── notifications.php
│ │ ├── fa
│ │ └── notifications.php
│ │ ├── fi
│ │ └── notifications.php
│ │ ├── fr
│ │ └── notifications.php
│ │ ├── hi
│ │ └── notifications.php
│ │ ├── id
│ │ └── notifications.php
│ │ ├── it
│ │ └── notifications.php
│ │ ├── ja
│ │ └── notifications.php
│ │ ├── nl
│ │ └── notifications.php
│ │ ├── pl
│ │ └── notifications.php
│ │ ├── pt-BR
│ │ └── notifications.php
│ │ ├── pt
│ │ └── notifications.php
│ │ ├── ro
│ │ └── notifications.php
│ │ ├── ru
│ │ └── notifications.php
│ │ ├── tr
│ │ └── notifications.php
│ │ ├── uk
│ │ └── notifications.php
│ │ ├── zh-CN
│ │ └── notifications.php
│ │ └── zh-TW
│ │ └── notifications.php
└── views
│ ├── api
│ ├── api-token-manager.blade.php
│ └── index.blade.php
│ ├── auth
│ ├── forgot-password.blade.php
│ ├── login.blade.php
│ ├── register.blade.php
│ ├── reset-password.blade.php
│ ├── two-factor-challenge.blade.php
│ └── verify-email.blade.php
│ ├── dashboard.blade.php
│ ├── layouts
│ ├── app.blade.php
│ └── guest.blade.php
│ ├── mails
│ └── test.blade.php
│ ├── navigation-dropdown.blade.php
│ ├── profile
│ ├── delete-user-form.blade.php
│ ├── logout-other-browser-sessions-form.blade.php
│ ├── show.blade.php
│ ├── two-factor-authentication-form.blade.php
│ ├── update-password-form.blade.php
│ └── update-profile-information-form.blade.php
│ └── welcome.blade.php
├── routes
├── api.php
├── channels.php
├── console.php
└── web.php
├── server.php
├── storage
├── .DS_Store
├── app
│ ├── .gitignore
│ └── public
│ │ └── .gitignore
├── framework
│ ├── .gitignore
│ ├── cache
│ │ ├── .gitignore
│ │ └── data
│ │ │ └── .gitignore
│ ├── sessions
│ │ └── .gitignore
│ ├── testing
│ │ └── .gitignore
│ └── views
│ │ └── .gitignore
└── logs
│ └── .gitignore
├── tailwind.config.js
├── tests
├── CreatesApplication.php
├── Feature
│ └── ExampleTest.php
├── TestCase.php
└── Unit
│ └── ExampleTest.php
└── webpack.mix.js
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brada1703/Laravel8-AWS/16027703a7be8c6b72bd835bdfebbaebc168d642/.DS_Store
--------------------------------------------------------------------------------
/.ebextensions/cronjob.config:
--------------------------------------------------------------------------------
1 | files:
2 | "/etc/cron.d/schedule_run":
3 | mode: "000644"
4 | owner: root
5 | group: root
6 | content: |
7 | * * * * * root . /opt/elasticbeanstalk/support/envvars && /usr/bin/php /var/www/html/artisan schedule:run 1>> /dev/null 2>&1
8 |
9 | commands:
10 | remove_old_cron:
11 | command: "rm -f /etc/cron.d/*.bak"
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | end_of_line = lf
6 | insert_final_newline = true
7 | indent_style = space
8 | indent_size = 4
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | trim_trailing_whitespace = false
13 |
14 | [*.{yml,yaml}]
15 | indent_size = 2
16 |
--------------------------------------------------------------------------------
/.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 |
9 | DB_CONNECTION=mysql
10 | DB_HOST=127.0.0.1
11 | DB_PORT=3306
12 | DB_DATABASE=laravel
13 | DB_USERNAME=root
14 | DB_PASSWORD=
15 |
16 | BROADCAST_DRIVER=log
17 | CACHE_DRIVER=file
18 | QUEUE_CONNECTION=sync
19 | SESSION_DRIVER=database
20 | SESSION_LIFETIME=120
21 |
22 | REDIS_HOST=127.0.0.1
23 | REDIS_PASSWORD=null
24 | REDIS_PORT=6379
25 |
26 | MAIL_MAILER=smtp
27 | MAIL_HOST=smtp.mailtrap.io
28 | MAIL_PORT=2525
29 | MAIL_USERNAME=null
30 | MAIL_PASSWORD=null
31 | MAIL_ENCRYPTION=null
32 | MAIL_FROM_ADDRESS=null
33 | MAIL_FROM_NAME="${APP_NAME}"
34 |
35 | AWS_ACCESS_KEY_ID=
36 | AWS_SECRET_ACCESS_KEY=
37 | AWS_DEFAULT_REGION=us-east-1
38 | AWS_BUCKET=
39 |
40 | PUSHER_APP_ID=
41 | PUSHER_APP_KEY=
42 | PUSHER_APP_SECRET=
43 | PUSHER_APP_CLUSTER=mt1
44 |
45 | MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
46 | MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
47 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto
2 | *.css linguist-vendored
3 | *.scss linguist-vendored
4 | *.js linguist-vendored
5 | CHANGELOG.md export-ignore
6 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules
2 | /public/hot
3 | /public/storage
4 | /storage/*.key
5 | /vendor
6 | .env
7 | .env.backup
8 | .phpunit.result.cache
9 | Homestead.json
10 | Homestead.yaml
11 | npm-debug.log
12 | yarn-error.log
13 |
--------------------------------------------------------------------------------
/.platform/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brada1703/Laravel8-AWS/16027703a7be8c6b72bd835bdfebbaebc168d642/.platform/.DS_Store
--------------------------------------------------------------------------------
/.platform/nginx/nginx.conf:
--------------------------------------------------------------------------------
1 | user nginx;
2 | error_log /var/log/nginx/error.log warn;
3 | pid /var/run/nginx.pid;
4 | worker_processes auto;
5 | worker_rlimit_nofile 32153;
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 | include conf.d/*.conf;
20 |
21 | map $http_upgrade $connection_upgrade {
22 | default "upgrade";
23 | }
24 |
25 | server {
26 | listen 80 default_server;
27 | access_log /var/log/nginx/access.log main;
28 |
29 | client_header_timeout 60;
30 | client_body_timeout 60;
31 | keepalive_timeout 60;
32 | gzip off;
33 | gzip_comp_level 4;
34 | gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
35 |
36 | # Do not include the Elastic Beanstalk generated locations
37 | # include conf.d/elasticbeanstalk/*.conf;
38 |
39 | # Move Elastic Beanstalk healthd.conf content here
40 | if ($time_iso8601 ~ "^(\d{4})-(\d{2})-(\d{2})T(\d{2})") {
41 | set $year $1;
42 | set $month $2;
43 | set $day $3;
44 | set $hour $4;
45 | }
46 |
47 | access_log /var/log/nginx/healthd/application.log.$year-$month-$day-$hour healthd;
48 |
49 | # Move Elastic Beanstalk php.conf content here
50 | root /var/www/html/public;
51 |
52 | index index.php index.html index.htm;
53 |
54 | # This is an additional configuration
55 | location / {
56 | try_files $uri $uri/ /index.php?$query_string;
57 | gzip_static on;
58 | }
59 |
60 | location ~ \.(php|phar)(/.*)?$ {
61 | fastcgi_split_path_info ^(.+\.(?:php|phar))(/.*)$;
62 |
63 | fastcgi_intercept_errors on;
64 | fastcgi_index index.php;
65 |
66 | fastcgi_param QUERY_STRING $query_string;
67 | fastcgi_param REQUEST_METHOD $request_method;
68 | fastcgi_param CONTENT_TYPE $content_type;
69 | fastcgi_param CONTENT_LENGTH $content_length;
70 |
71 | fastcgi_param SCRIPT_NAME $fastcgi_script_name;
72 | fastcgi_param REQUEST_URI $request_uri;
73 | fastcgi_param DOCUMENT_URI $document_uri;
74 | fastcgi_param DOCUMENT_ROOT $document_root;
75 | fastcgi_param SERVER_PROTOCOL $server_protocol;
76 | fastcgi_param REQUEST_SCHEME $scheme;
77 | fastcgi_param HTTPS $https if_not_empty;
78 |
79 | fastcgi_param GATEWAY_INTERFACE CGI/1.1;
80 | fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
81 |
82 | fastcgi_param REMOTE_ADDR $remote_addr;
83 | fastcgi_param REMOTE_PORT $remote_port;
84 | fastcgi_param SERVER_ADDR $server_addr;
85 | fastcgi_param SERVER_PORT $server_port;
86 | fastcgi_param SERVER_NAME $server_name;
87 |
88 | # PHP only, required if PHP was built with --enable-force-cgi-redirect
89 | fastcgi_param REDIRECT_STATUS 200;
90 |
91 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
92 | fastcgi_param PATH_INFO $fastcgi_path_info;
93 | fastcgi_pass php-fpm;
94 | }
95 | }
96 | }
97 |
--------------------------------------------------------------------------------
/.styleci.yml:
--------------------------------------------------------------------------------
1 | php:
2 | preset: laravel
3 | disabled:
4 | - no_unused_imports
5 | finder:
6 | not-name:
7 | - index.php
8 | - server.php
9 | js:
10 | finder:
11 | not-name:
12 | - webpack.mix.js
13 | css: true
14 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Boilerplate Laravel 8 application for use on AWS
2 |
3 | Using:
4 | - Elastic Beanstalk
5 | - CodeCommit / CodePipeline
6 | - Database Connection, Migrations, Backups
7 | - Cloudwatch Logs
8 | - SES Emails
9 | - Domain registration
10 | - SSL Certificate
11 | - Crons
12 |
13 | Following video tutorial: https://youtu.be/KtpiF3SUCkA
14 |
--------------------------------------------------------------------------------
/app/Actions/Fortify/CreateNewUser.php:
--------------------------------------------------------------------------------
1 | ['required', 'string', 'max:255'],
24 | 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
25 | 'password' => $this->passwordRules(),
26 | ])->validate();
27 |
28 | return User::create([
29 | 'name' => $input['name'],
30 | 'email' => $input['email'],
31 | 'password' => Hash::make($input['password']),
32 | ]);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/app/Actions/Fortify/PasswordValidationRules.php:
--------------------------------------------------------------------------------
1 | $this->passwordRules(),
24 | ])->validate();
25 |
26 | $user->forceFill([
27 | 'password' => Hash::make($input['password']),
28 | ])->save();
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/app/Actions/Fortify/UpdateUserPassword.php:
--------------------------------------------------------------------------------
1 | ['required', 'string'],
24 | 'password' => $this->passwordRules(),
25 | ])->after(function ($validator) use ($user, $input) {
26 | if (! Hash::check($input['current_password'], $user->password)) {
27 | $validator->errors()->add('current_password', __('The provided password does not match your current password.'));
28 | }
29 | })->validateWithBag('updatePassword');
30 |
31 | $user->forceFill([
32 | 'password' => Hash::make($input['password']),
33 | ])->save();
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/app/Actions/Fortify/UpdateUserProfileInformation.php:
--------------------------------------------------------------------------------
1 | ['required', 'string', 'max:255'],
23 | 'email' => ['required', 'email', 'max:255', Rule::unique('users')->ignore($user->id)],
24 | 'photo' => ['nullable', 'image', 'max:1024'],
25 | ])->validateWithBag('updateProfileInformation');
26 |
27 | if (isset($input['photo'])) {
28 | $user->updateProfilePhoto($input['photo']);
29 | }
30 |
31 | if ($input['email'] !== $user->email &&
32 | $user instanceof MustVerifyEmail) {
33 | $this->updateVerifiedUser($user, $input);
34 | } else {
35 | $user->forceFill([
36 | 'name' => $input['name'],
37 | 'email' => $input['email'],
38 | ])->save();
39 | }
40 | }
41 |
42 | /**
43 | * Update the given verified user's profile information.
44 | *
45 | * @param mixed $user
46 | * @param array $input
47 | * @return void
48 | */
49 | protected function updateVerifiedUser($user, array $input)
50 | {
51 | $user->forceFill([
52 | 'name' => $input['name'],
53 | 'email' => $input['email'],
54 | 'email_verified_at' => null,
55 | ])->save();
56 |
57 | $user->sendEmailVerificationNotification();
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/app/Actions/Jetstream/DeleteUser.php:
--------------------------------------------------------------------------------
1 | delete();
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/app/Console/Kernel.php:
--------------------------------------------------------------------------------
1 | command('inspire')->hourly();
28 | $schedule->command('backup:run --only-db')->dailyAt('4:00');
29 | }
30 |
31 | /**
32 | * Register the commands for the application.
33 | *
34 | * @return void
35 | */
36 | protected function commands()
37 | {
38 | $this->load(__DIR__.'/Commands');
39 |
40 | require base_path('routes/console.php');
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/app/Exceptions/Handler.php:
--------------------------------------------------------------------------------
1 | [
33 | \App\Http\Middleware\EncryptCookies::class,
34 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
35 | \Illuminate\Session\Middleware\StartSession::class,
36 | \Laravel\Jetstream\Http\Middleware\AuthenticateSession::class,
37 | \Illuminate\View\Middleware\ShareErrorsFromSession::class,
38 | \App\Http\Middleware\VerifyCsrfToken::class,
39 | \Illuminate\Routing\Middleware\SubstituteBindings::class,
40 | ],
41 |
42 | 'api' => [
43 | 'throttle:api',
44 | \Illuminate\Routing\Middleware\SubstituteBindings::class,
45 | ],
46 | ];
47 |
48 | /**
49 | * The application's route middleware.
50 | *
51 | * These middleware may be assigned to groups or used individually.
52 | *
53 | * @var array
54 | */
55 | protected $routeMiddleware = [
56 | 'auth' => \App\Http\Middleware\Authenticate::class,
57 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
58 | 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
59 | 'can' => \Illuminate\Auth\Middleware\Authorize::class,
60 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
61 | 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
62 | 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
63 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
64 | 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
65 | ];
66 | }
67 |
--------------------------------------------------------------------------------
/app/Http/Middleware/Authenticate.php:
--------------------------------------------------------------------------------
1 | expectsJson()) {
18 | return route('login');
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/app/Http/Middleware/EncryptCookies.php:
--------------------------------------------------------------------------------
1 | check()) {
25 | return redirect(RouteServiceProvider::HOME);
26 | }
27 | }
28 |
29 | return $next($request);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/app/Http/Middleware/TrimStrings.php:
--------------------------------------------------------------------------------
1 | allSubdomainsOfApplicationUrl(),
18 | ];
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/app/Http/Middleware/TrustProxies.php:
--------------------------------------------------------------------------------
1 | pushHandler($handler);
42 |
43 | return $logger;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/app/Mail/TestMail.php:
--------------------------------------------------------------------------------
1 | view('mails.test');
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/app/Models/User.php:
--------------------------------------------------------------------------------
1 | 'datetime',
51 | ];
52 |
53 | /**
54 | * The accessors to append to the model's array form.
55 | *
56 | * @var array
57 | */
58 | protected $appends = [
59 | 'profile_photo_url',
60 | ];
61 | }
62 |
--------------------------------------------------------------------------------
/app/Providers/AppServiceProvider.php:
--------------------------------------------------------------------------------
1 | 'App\Policies\ModelPolicy',
17 | ];
18 |
19 | /**
20 | * Register any authentication / authorization services.
21 | *
22 | * @return void
23 | */
24 | public function boot()
25 | {
26 | $this->registerPolicies();
27 |
28 | //
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/app/Providers/BroadcastServiceProvider.php:
--------------------------------------------------------------------------------
1 | [
19 | SendEmailVerificationNotification::class,
20 | ],
21 | ];
22 |
23 | /**
24 | * Register any events for your application.
25 | *
26 | * @return void
27 | */
28 | public function boot()
29 | {
30 | //
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/app/Providers/FortifyServiceProvider.php:
--------------------------------------------------------------------------------
1 | configurePermissions();
29 |
30 | Jetstream::deleteUsersUsing(DeleteUser::class);
31 | }
32 |
33 | /**
34 | * Configure the permissions that are available within the application.
35 | *
36 | * @return void
37 | */
38 | protected function configurePermissions()
39 | {
40 | Jetstream::defaultApiTokenPermissions(['read']);
41 |
42 | Jetstream::permissions([
43 | 'create',
44 | 'read',
45 | 'update',
46 | 'delete',
47 | ]);
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/app/Providers/RouteServiceProvider.php:
--------------------------------------------------------------------------------
1 | configureRateLimiting();
39 |
40 | $this->routes(function () {
41 | Route::prefix('api')
42 | ->middleware('api')
43 | ->namespace($this->namespace)
44 | ->group(base_path('routes/api.php'));
45 |
46 | Route::middleware('web')
47 | ->namespace($this->namespace)
48 | ->group(base_path('routes/web.php'));
49 | });
50 | }
51 |
52 | /**
53 | * Configure the rate limiters for the application.
54 | *
55 | * @return void
56 | */
57 | protected function configureRateLimiting()
58 | {
59 | RateLimiter::for('api', function (Request $request) {
60 | return Limit::perMinute(60);
61 | });
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/app/View/Components/AppLayout.php:
--------------------------------------------------------------------------------
1 | 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 | 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": "laravel/laravel",
3 | "type": "project",
4 | "description": "The Laravel Framework.",
5 | "keywords": [
6 | "framework",
7 | "laravel"
8 | ],
9 | "license": "MIT",
10 | "require": {
11 | "php": "^7.3",
12 | "fideloper/proxy": "^4.2",
13 | "fruitcake/laravel-cors": "^2.0",
14 | "guzzlehttp/guzzle": "^7.0.1",
15 | "laravel/framework": "^8.0",
16 | "laravel/jetstream": "^1.3",
17 | "laravel/sanctum": "^2.6",
18 | "laravel/tinker": "^2.0",
19 | "league/flysystem-aws-s3-v3": "^1.0",
20 | "livewire/livewire": "^2.0",
21 | "maxbanton/cwh": "^2.0",
22 | "spatie/laravel-backup": "^6.11"
23 | },
24 | "require-dev": {
25 | "facade/ignition": "^2.3.6",
26 | "fzaninotto/faker": "^1.9.1",
27 | "mockery/mockery": "^1.3.1",
28 | "nunomaduro/collision": "^5.0",
29 | "phpunit/phpunit": "^9.3"
30 | },
31 | "config": {
32 | "optimize-autoloader": true,
33 | "preferred-install": "dist",
34 | "sort-packages": true
35 | },
36 | "extra": {
37 | "laravel": {
38 | "dont-discover": []
39 | }
40 | },
41 | "autoload": {
42 | "psr-4": {
43 | "App\\": "app/",
44 | "Database\\Factories\\": "database/factories/",
45 | "Database\\Seeders\\": "database/seeders/"
46 | }
47 | },
48 | "autoload-dev": {
49 | "psr-4": {
50 | "Tests\\": "tests/"
51 | }
52 | },
53 | "minimum-stability": "dev",
54 | "prefer-stable": true,
55 | "scripts": {
56 | "post-autoload-dump": [
57 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
58 | "@php artisan package:discover --ansi"
59 | ],
60 | "post-root-package-install": [
61 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
62 | ],
63 | "post-create-project-cmd": [
64 | "@php artisan key:generate --ansi"
65 | ]
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/config/app.php:
--------------------------------------------------------------------------------
1 | env('APP_NAME', 'Laravel'),
6 | 'env' => array_key_exists('APP_ENV', $_SERVER) ? $_SERVER['APP_ENV'] : env('APP_ENV'),
7 | 'debug' => array_key_exists('APP_DEBUG', $_SERVER) ? ($_SERVER['APP_DEBUG'] === 'false' ? false : true) : env('APP_DEBUG'),
8 | 'url' => env('APP_URL', 'http://localhost'),
9 | 'asset_url' => env('ASSET_URL', null),
10 | 'timezone' => 'UTC',
11 | 'locale' => 'en',
12 | 'fallback_locale' => 'en',
13 | 'faker_locale' => 'en_US',
14 | 'key' => array_key_exists('APP_KEY', $_SERVER) ? $_SERVER['APP_KEY'] : env('APP_KEY'),
15 |
16 | 'cipher' => 'AES-256-CBC',
17 |
18 | 'providers' => [
19 |
20 | /*
21 | * Laravel Framework Service Providers...
22 | */
23 | Illuminate\Auth\AuthServiceProvider::class,
24 | Illuminate\Broadcasting\BroadcastServiceProvider::class,
25 | Illuminate\Bus\BusServiceProvider::class,
26 | Illuminate\Cache\CacheServiceProvider::class,
27 | Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
28 | Illuminate\Cookie\CookieServiceProvider::class,
29 | Illuminate\Database\DatabaseServiceProvider::class,
30 | Illuminate\Encryption\EncryptionServiceProvider::class,
31 | Illuminate\Filesystem\FilesystemServiceProvider::class,
32 | Illuminate\Foundation\Providers\FoundationServiceProvider::class,
33 | Illuminate\Hashing\HashServiceProvider::class,
34 | Illuminate\Mail\MailServiceProvider::class,
35 | Illuminate\Notifications\NotificationServiceProvider::class,
36 | Illuminate\Pagination\PaginationServiceProvider::class,
37 | Illuminate\Pipeline\PipelineServiceProvider::class,
38 | Illuminate\Queue\QueueServiceProvider::class,
39 | Illuminate\Redis\RedisServiceProvider::class,
40 | Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
41 | Illuminate\Session\SessionServiceProvider::class,
42 | Illuminate\Translation\TranslationServiceProvider::class,
43 | Illuminate\Validation\ValidationServiceProvider::class,
44 | Illuminate\View\ViewServiceProvider::class,
45 |
46 | /*
47 | * Package Service Providers...
48 | */
49 |
50 | /*
51 | * Application Service Providers...
52 | */
53 | App\Providers\AppServiceProvider::class,
54 | App\Providers\AuthServiceProvider::class,
55 | // App\Providers\BroadcastServiceProvider::class,
56 | App\Providers\EventServiceProvider::class,
57 | App\Providers\RouteServiceProvider::class,
58 | App\Providers\FortifyServiceProvider::class,
59 | App\Providers\JetstreamServiceProvider::class,
60 |
61 | ],
62 |
63 | /*
64 | |--------------------------------------------------------------------------
65 | | Class Aliases
66 | |--------------------------------------------------------------------------
67 | |
68 | | This array of class aliases will be registered when this application
69 | | is started. However, feel free to register as many as you wish as
70 | | the aliases are "lazy" loaded so they don't hinder performance.
71 | |
72 | */
73 |
74 | 'aliases' => [
75 |
76 | 'App' => Illuminate\Support\Facades\App::class,
77 | 'Arr' => Illuminate\Support\Arr::class,
78 | 'Artisan' => Illuminate\Support\Facades\Artisan::class,
79 | 'Auth' => Illuminate\Support\Facades\Auth::class,
80 | 'Blade' => Illuminate\Support\Facades\Blade::class,
81 | 'Broadcast' => Illuminate\Support\Facades\Broadcast::class,
82 | 'Bus' => Illuminate\Support\Facades\Bus::class,
83 | 'Cache' => Illuminate\Support\Facades\Cache::class,
84 | 'Config' => Illuminate\Support\Facades\Config::class,
85 | 'Cookie' => Illuminate\Support\Facades\Cookie::class,
86 | 'Crypt' => Illuminate\Support\Facades\Crypt::class,
87 | 'DB' => Illuminate\Support\Facades\DB::class,
88 | 'Eloquent' => Illuminate\Database\Eloquent\Model::class,
89 | 'Event' => Illuminate\Support\Facades\Event::class,
90 | 'File' => Illuminate\Support\Facades\File::class,
91 | 'Gate' => Illuminate\Support\Facades\Gate::class,
92 | 'Hash' => Illuminate\Support\Facades\Hash::class,
93 | 'Http' => Illuminate\Support\Facades\Http::class,
94 | 'Lang' => Illuminate\Support\Facades\Lang::class,
95 | 'Log' => Illuminate\Support\Facades\Log::class,
96 | 'Mail' => Illuminate\Support\Facades\Mail::class,
97 | 'Notification' => Illuminate\Support\Facades\Notification::class,
98 | 'Password' => Illuminate\Support\Facades\Password::class,
99 | 'Queue' => Illuminate\Support\Facades\Queue::class,
100 | 'Redirect' => Illuminate\Support\Facades\Redirect::class,
101 | 'Redis' => Illuminate\Support\Facades\Redis::class,
102 | 'Request' => Illuminate\Support\Facades\Request::class,
103 | 'Response' => Illuminate\Support\Facades\Response::class,
104 | 'Route' => Illuminate\Support\Facades\Route::class,
105 | 'Schema' => Illuminate\Support\Facades\Schema::class,
106 | 'Session' => Illuminate\Support\Facades\Session::class,
107 | 'Storage' => Illuminate\Support\Facades\Storage::class,
108 | 'Str' => Illuminate\Support\Str::class,
109 | 'URL' => Illuminate\Support\Facades\URL::class,
110 | 'Validator' => Illuminate\Support\Facades\Validator::class,
111 | 'View' => Illuminate\Support\Facades\View::class,
112 |
113 | ],
114 |
115 | ];
116 |
--------------------------------------------------------------------------------
/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", "token"
35 | |
36 | */
37 |
38 | 'guards' => [
39 | 'web' => [
40 | 'driver' => 'session',
41 | 'provider' => 'users',
42 | ],
43 |
44 | 'api' => [
45 | 'driver' => 'token',
46 | 'provider' => 'users',
47 | 'hash' => false,
48 | ],
49 | ],
50 |
51 | /*
52 | |--------------------------------------------------------------------------
53 | | User Providers
54 | |--------------------------------------------------------------------------
55 | |
56 | | All authentication drivers have a user provider. This defines how the
57 | | users are actually retrieved out of your database or other storage
58 | | mechanisms used by this application to persist your user's data.
59 | |
60 | | If you have multiple user tables or models you may configure multiple
61 | | sources which represent each model / table. These sources may then
62 | | be assigned to any extra authentication guards you have defined.
63 | |
64 | | Supported: "database", "eloquent"
65 | |
66 | */
67 |
68 | 'providers' => [
69 | 'users' => [
70 | 'driver' => 'eloquent',
71 | 'model' => App\Models\User::class,
72 | ],
73 |
74 | // 'users' => [
75 | // 'driver' => 'database',
76 | // 'table' => 'users',
77 | // ],
78 | ],
79 |
80 | /*
81 | |--------------------------------------------------------------------------
82 | | Resetting Passwords
83 | |--------------------------------------------------------------------------
84 | |
85 | | You may specify multiple password reset configurations if you have more
86 | | than one user table or model in the application and you want to have
87 | | separate password reset settings based on the specific user types.
88 | |
89 | | The expire time is the number of minutes that the reset token should be
90 | | considered valid. This security feature keeps tokens short-lived so
91 | | they have less time to be guessed. You may change this as needed.
92 | |
93 | */
94 |
95 | 'passwords' => [
96 | 'users' => [
97 | 'provider' => 'users',
98 | 'table' => 'password_resets',
99 | 'expire' => 60,
100 | 'throttle' => 60,
101 | ],
102 | ],
103 |
104 | /*
105 | |--------------------------------------------------------------------------
106 | | Password Confirmation Timeout
107 | |--------------------------------------------------------------------------
108 | |
109 | | Here you may define the amount of seconds before a password confirmation
110 | | times out and the user is prompted to re-enter their password via the
111 | | confirmation screen. By default, the timeout lasts for three hours.
112 | |
113 | */
114 |
115 | 'password_timeout' => 10800,
116 |
117 | ];
118 |
--------------------------------------------------------------------------------
/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 | 'cluster' => env('PUSHER_APP_CLUSTER'),
40 | 'useTLS' => true,
41 | ],
42 | ],
43 |
44 | 'redis' => [
45 | 'driver' => 'redis',
46 | 'connection' => 'default',
47 | ],
48 |
49 | 'log' => [
50 | 'driver' => 'log',
51 | ],
52 |
53 | 'null' => [
54 | 'driver' => 'null',
55 | ],
56 |
57 | ],
58 |
59 | ];
60 |
--------------------------------------------------------------------------------
/config/cache.php:
--------------------------------------------------------------------------------
1 | env('CACHE_DRIVER', 'file'),
22 |
23 | /*
24 | |--------------------------------------------------------------------------
25 | | Cache Stores
26 | |--------------------------------------------------------------------------
27 | |
28 | | Here you may define all of the cache "stores" for your application as
29 | | well as their drivers. You may even define multiple stores for the
30 | | same cache driver to group types of items stored in your caches.
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 | ],
50 |
51 | 'file' => [
52 | 'driver' => 'file',
53 | 'path' => storage_path('framework/cache/data'),
54 | ],
55 |
56 | 'memcached' => [
57 | 'driver' => 'memcached',
58 | 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
59 | 'sasl' => [
60 | env('MEMCACHED_USERNAME'),
61 | env('MEMCACHED_PASSWORD'),
62 | ],
63 | 'options' => [
64 | // Memcached::OPT_CONNECT_TIMEOUT => 2000,
65 | ],
66 | 'servers' => [
67 | [
68 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'),
69 | 'port' => env('MEMCACHED_PORT', 11211),
70 | 'weight' => 100,
71 | ],
72 | ],
73 | ],
74 |
75 | 'redis' => [
76 | 'driver' => 'redis',
77 | 'connection' => 'cache',
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 | ],
90 |
91 | /*
92 | |--------------------------------------------------------------------------
93 | | Cache Key Prefix
94 | |--------------------------------------------------------------------------
95 | |
96 | | When utilizing a RAM based store such as APC or Memcached, there might
97 | | be other applications utilizing the same cache. So, we'll specify a
98 | | value to get prefixed to all our keys so we can avoid collisions.
99 | |
100 | */
101 |
102 | 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'),
103 |
104 | ];
105 |
--------------------------------------------------------------------------------
/config/cors.php:
--------------------------------------------------------------------------------
1 | ['api/*'],
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/database.php:
--------------------------------------------------------------------------------
1 | env('DB_CONNECTION', 'mysql'),
8 |
9 | 'connections' => [
10 |
11 | 'sqlite' => [
12 | 'driver' => 'sqlite',
13 | 'url' => env('DATABASE_URL'),
14 | 'database' => env('DB_DATABASE', database_path('database.sqlite')),
15 | 'prefix' => '',
16 | 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
17 | ],
18 |
19 | 'mysql' => [
20 | 'driver' => 'mysql',
21 | 'url' => array_key_exists('DATABASE_URL', $_SERVER) ? $_SERVER['DATABASE_URL'] : env('DATABASE_URL'),
22 | 'host' => array_key_exists('DB_HOST', $_SERVER) ? $_SERVER['DB_HOST'] : env('DB_HOST'),
23 | 'port' => array_key_exists('DB_PORT', $_SERVER) ? $_SERVER['DB_PORT'] : env('DB_PORT'),
24 | 'database' => array_key_exists('DB_DATABASE', $_SERVER) ? $_SERVER['DB_DATABASE'] : env('DB_DATABASE'),
25 | 'username' => array_key_exists('DB_USERNAME', $_SERVER) ? $_SERVER['DB_USERNAME'] : env('DB_USERNAME'),
26 | 'password' => array_key_exists('DB_PASSWORD', $_SERVER) ? $_SERVER['DB_PASSWORD'] : env('DB_PASSWORD'),
27 | 'unix_socket' => env('DB_SOCKET', ''),
28 | 'charset' => 'utf8mb4',
29 | 'collation' => 'utf8mb4_unicode_ci',
30 | 'prefix' => '',
31 | 'prefix_indexes' => true,
32 | 'strict' => true,
33 | 'engine' => null,
34 | 'options' => extension_loaded('pdo_mysql') ? array_filter([
35 | PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
36 | ]) : [],
37 | ],
38 |
39 | 'pgsql' => [
40 | 'driver' => 'pgsql',
41 | 'url' => env('DATABASE_URL'),
42 | 'host' => env('DB_HOST', '127.0.0.1'),
43 | 'port' => env('DB_PORT', '5432'),
44 | 'database' => env('DB_DATABASE', 'forge'),
45 | 'username' => env('DB_USERNAME', 'forge'),
46 | 'password' => env('DB_PASSWORD', ''),
47 | 'charset' => 'utf8',
48 | 'prefix' => '',
49 | 'prefix_indexes' => true,
50 | 'schema' => 'public',
51 | 'sslmode' => 'prefer',
52 | ],
53 |
54 | 'sqlsrv' => [
55 | 'driver' => 'sqlsrv',
56 | 'url' => env('DATABASE_URL'),
57 | 'host' => env('DB_HOST', 'localhost'),
58 | 'port' => env('DB_PORT', '1433'),
59 | 'database' => env('DB_DATABASE', 'forge'),
60 | 'username' => env('DB_USERNAME', 'forge'),
61 | 'password' => env('DB_PASSWORD', ''),
62 | 'charset' => 'utf8',
63 | 'prefix' => '',
64 | 'prefix_indexes' => true,
65 | ],
66 |
67 | ],
68 |
69 | /*
70 | |--------------------------------------------------------------------------
71 | | Migration Repository Table
72 | |--------------------------------------------------------------------------
73 | |
74 | | This table keeps track of all the migrations that have already run for
75 | | your application. Using this information, we can determine which of
76 | | the migrations on disk haven't actually been run in the database.
77 | |
78 | */
79 |
80 | 'migrations' => 'migrations',
81 |
82 | /*
83 | |--------------------------------------------------------------------------
84 | | Redis Databases
85 | |--------------------------------------------------------------------------
86 | |
87 | | Redis is an open source, fast, and advanced key-value store that also
88 | | provides a richer body of commands than a typical key-value system
89 | | such as APC or Memcached. Laravel makes it easy to dig right in.
90 | |
91 | */
92 |
93 | 'redis' => [
94 |
95 | 'client' => env('REDIS_CLIENT', 'phpredis'),
96 |
97 | 'options' => [
98 | 'cluster' => env('REDIS_CLUSTER', 'redis'),
99 | 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
100 | ],
101 |
102 | 'default' => [
103 | 'url' => env('REDIS_URL'),
104 | 'host' => env('REDIS_HOST', '127.0.0.1'),
105 | 'password' => env('REDIS_PASSWORD', null),
106 | 'port' => env('REDIS_PORT', '6379'),
107 | 'database' => env('REDIS_DB', '0'),
108 | ],
109 |
110 | 'cache' => [
111 | 'url' => env('REDIS_URL'),
112 | 'host' => env('REDIS_HOST', '127.0.0.1'),
113 | 'password' => env('REDIS_PASSWORD', null),
114 | 'port' => env('REDIS_PORT', '6379'),
115 | 'database' => env('REDIS_CACHE_DB', '1'),
116 | ],
117 |
118 | ],
119 |
120 | ];
121 |
--------------------------------------------------------------------------------
/config/filesystems.php:
--------------------------------------------------------------------------------
1 | env('FILESYSTEM_DRIVER', 'local'),
17 |
18 | /*
19 | |--------------------------------------------------------------------------
20 | | Default Cloud Filesystem Disk
21 | |--------------------------------------------------------------------------
22 | |
23 | | Many applications store files both locally and in the cloud. For this
24 | | reason, you may specify a default "cloud" driver here. This driver
25 | | will be bound as the Cloud disk implementation in the container.
26 | |
27 | */
28 |
29 | 'cloud' => env('FILESYSTEM_CLOUD', 's3'),
30 |
31 | /*
32 | |--------------------------------------------------------------------------
33 | | Filesystem Disks
34 | |--------------------------------------------------------------------------
35 | |
36 | | Here you may configure as many filesystem "disks" as you wish, and you
37 | | may even configure multiple disks of the same driver. Defaults have
38 | | been setup for each driver as an example of the required options.
39 | |
40 | | Supported Drivers: "local", "ftp", "sftp", "s3"
41 | |
42 | */
43 |
44 | 'disks' => [
45 |
46 | 'local' => [
47 | 'driver' => 'local',
48 | 'root' => storage_path('app'),
49 | ],
50 |
51 | 'public' => [
52 | 'driver' => 'local',
53 | 'root' => storage_path('app/public'),
54 | 'url' => env('APP_URL').'/storage',
55 | 'visibility' => 'public',
56 | ],
57 |
58 | 's3' => [
59 | 'driver' => 's3',
60 | 'key' => array_key_exists('AWS_ACCESS_KEY_ID', $_SERVER) ? $_SERVER['AWS_ACCESS_KEY_ID'] : env('AWS_ACCESS_KEY_ID'),
61 | 'secret' => array_key_exists('AWS_SECRET_ACCESS_KEY', $_SERVER) ? $_SERVER['AWS_SECRET_ACCESS_KEY'] : env('AWS_SECRET_ACCESS_KEY'),
62 | 'region' => array_key_exists('AWS_DEFAULT_REGION', $_SERVER) ? $_SERVER['AWS_DEFAULT_REGION'] : env('AWS_DEFAULT_REGION'),
63 | 'bucket' => array_key_exists('AWS_BUCKET', $_SERVER) ? $_SERVER['AWS_BUCKET'] : env('AWS_BUCKET'),
64 | 'url' => array_key_exists('AWS_URL', $_SERVER) ? $_SERVER['AWS_URL'] : env('AWS_URL'),
65 | 'endpoint' => array_key_exists('AWS_ENDPOINT', $_SERVER) ? $_SERVER['AWS_ENDPOINT'] : env('AWS_ENDPOINT'),
66 | ],
67 |
68 | ],
69 |
70 | /*
71 | |--------------------------------------------------------------------------
72 | | Symbolic Links
73 | |--------------------------------------------------------------------------
74 | |
75 | | Here you may configure the symbolic links that will be created when the
76 | | `storage:link` Artisan command is executed. The array keys should be
77 | | the locations of the links and the values should be their targets.
78 | |
79 | */
80 |
81 | 'links' => [
82 | public_path('storage') => storage_path('app/public'),
83 | ],
84 |
85 | ];
86 |
--------------------------------------------------------------------------------
/config/fortify.php:
--------------------------------------------------------------------------------
1 | 'web',
20 |
21 | /*
22 | |--------------------------------------------------------------------------
23 | | Fortify Password Broker
24 | |--------------------------------------------------------------------------
25 | |
26 | | Here you may specify which password broker Fortify can use when a user
27 | | is resetting their password. This configured value should match one
28 | | of your password brokers setup in your "auth" configuration file.
29 | |
30 | */
31 |
32 | 'passwords' => 'users',
33 |
34 | /*
35 | |--------------------------------------------------------------------------
36 | | Username / Email
37 | |--------------------------------------------------------------------------
38 | |
39 | | This value defines which model attribute should be considered as your
40 | | application's "username" field. Typically, this might be the email
41 | | address of the users but you are free to change this value here.
42 | |
43 | | Out of the box, Fortify expects forgot password and reset password
44 | | requests to have a field named 'email'. If the application uses
45 | | another name for the field you may define it below as needed.
46 | |
47 | */
48 |
49 | 'username' => 'email',
50 |
51 | 'email' => 'email',
52 |
53 | /*
54 | |--------------------------------------------------------------------------
55 | | Home Path
56 | |--------------------------------------------------------------------------
57 | |
58 | | Here you may configure the path where users will get redirected during
59 | | authentication or password reset when the operations are successful
60 | | and the user is authenticated. You are free to change this value.
61 | |
62 | */
63 |
64 | 'home' => RouteServiceProvider::HOME,
65 |
66 | /*
67 | |--------------------------------------------------------------------------
68 | | Fortify Routes Middleware
69 | |--------------------------------------------------------------------------
70 | |
71 | | Here you may specify which middleware Fortify will assign to the routes
72 | | that it registers with the application. If necessary, you may change
73 | | these middleware but typically this provided default is preferred.
74 | |
75 | */
76 |
77 | 'middleware' => ['web'],
78 |
79 | /*
80 | |--------------------------------------------------------------------------
81 | | Rate Limiting
82 | |--------------------------------------------------------------------------
83 | |
84 | | By default, Fortify will throttle logins to five requests per minute for
85 | | every email and IP address combination. However, if you would like to
86 | | specify a custom rate limiter to call then you may specify it here.
87 | |
88 | */
89 |
90 | 'limiters' => [
91 | 'login' => null,
92 | ],
93 |
94 | /*
95 | |--------------------------------------------------------------------------
96 | | Features
97 | |--------------------------------------------------------------------------
98 | |
99 | | Some of the Fortify features are optional. You may disable the features
100 | | by removing them from this array. You're free to only remove some of
101 | | these features or you can even remove all of these if you need to.
102 | |
103 | */
104 |
105 | 'features' => [
106 | Features::registration(),
107 | Features::resetPasswords(),
108 | // Features::emailVerification(),
109 | Features::updateProfileInformation(),
110 | Features::updatePasswords(),
111 | Features::twoFactorAuthentication([
112 | 'confirmPassword' => true,
113 | ]),
114 | ],
115 |
116 | ];
117 |
--------------------------------------------------------------------------------
/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' => 1024,
48 | 'threads' => 2,
49 | 'time' => 2,
50 | ],
51 |
52 | ];
53 |
--------------------------------------------------------------------------------
/config/jetstream.php:
--------------------------------------------------------------------------------
1 | 'livewire',
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Features
23 | |--------------------------------------------------------------------------
24 | |
25 | | Some of Jetstream's features are optional. You may disable the features
26 | | by removing them from this array. You're free to only remove some of
27 | | these features or you can even remove all of these if you need to.
28 | |
29 | */
30 |
31 | 'features' => [
32 | Features::profilePhotos(),
33 | Features::api(),
34 | // Features::teams(),
35 | ],
36 |
37 | ];
38 |
--------------------------------------------------------------------------------
/config/logging.php:
--------------------------------------------------------------------------------
1 | array_key_exists('LOG_CHANNEL', $_SERVER) ? $_SERVER['LOG_CHANNEL'] : env('LOG_CHANNEL', 'cloudwatch'),
10 |
11 | 'channels' => [
12 | 'stack' => [
13 | 'driver' => 'stack',
14 | 'channels' => ['single'],
15 | 'ignore_exceptions' => false,
16 | ],
17 |
18 | 'single' => [
19 | 'driver' => 'single',
20 | 'path' => storage_path('logs/laravel.log'),
21 | 'level' => 'debug',
22 | ],
23 |
24 | 'daily' => [
25 | 'driver' => 'daily',
26 | 'path' => storage_path('logs/laravel.log'),
27 | 'level' => 'debug',
28 | 'days' => 14,
29 | ],
30 |
31 | 'slack' => [
32 | 'driver' => 'slack',
33 | 'url' => env('LOG_SLACK_WEBHOOK_URL'),
34 | 'username' => 'Laravel Log',
35 | 'emoji' => ':boom:',
36 | 'level' => 'critical',
37 | ],
38 |
39 | 'papertrail' => [
40 | 'driver' => 'monolog',
41 | 'level' => 'debug',
42 | 'handler' => SyslogUdpHandler::class,
43 | 'handler_with' => [
44 | 'host' => env('PAPERTRAIL_URL'),
45 | 'port' => env('PAPERTRAIL_PORT'),
46 | ],
47 | ],
48 |
49 | 'stderr' => [
50 | 'driver' => 'monolog',
51 | 'handler' => StreamHandler::class,
52 | 'formatter' => env('LOG_STDERR_FORMATTER'),
53 | 'with' => [
54 | 'stream' => 'php://stderr',
55 | ],
56 | ],
57 |
58 | 'syslog' => [
59 | 'driver' => 'syslog',
60 | 'level' => 'debug',
61 | ],
62 |
63 | 'errorlog' => [
64 | 'driver' => 'errorlog',
65 | 'level' => 'debug',
66 | ],
67 |
68 | 'null' => [
69 | 'driver' => 'monolog',
70 | 'handler' => NullHandler::class,
71 | ],
72 |
73 | 'emergency' => [
74 | 'path' => storage_path('logs/laravel.log'),
75 | ],
76 |
77 | 'cloudwatch' => [
78 | 'driver' => 'custom',
79 | 'via' => \App\Logging\CloudWatchLoggerFactory::class,
80 | 'sdk' => [
81 | 'region' => array_key_exists('AWS_DEFAULT_REGION', $_SERVER) ? $_SERVER['AWS_DEFAULT_REGION'] : env('AWS_DEFAULT_REGION', 'eu-west-1'),
82 | 'version' => 'latest',
83 | 'credentials' => [
84 | 'key' => array_key_exists('AWS_ACCESS_KEY_ID', $_SERVER) ? $_SERVER['AWS_ACCESS_KEY_ID'] : env('AWS_ACCESS_KEY_ID'),
85 | 'secret' => array_key_exists('AWS_SECRET_ACCESS_KEY', $_SERVER) ? $_SERVER['AWS_SECRET_ACCESS_KEY'] : env('AWS_SECRET_ACCESS_KEY'),
86 | ]
87 | ],
88 | 'retention' => env('CLOUDWATCH_LOG_RETENTION', 30),
89 | 'level' => env('CLOUDWATCH_LOG_LEVEL', 'error')
90 | ],
91 | ],
92 |
93 | ];
94 |
--------------------------------------------------------------------------------
/config/mail.php:
--------------------------------------------------------------------------------
1 | array_key_exists('MAIL_MAILER', $_SERVER) ? $_SERVER['MAIL_MAILER'] : env('MAIL_MAILER'),
6 |
7 | 'mailers' => [
8 | 'smtp' => [
9 | 'transport' => 'smtp',
10 | 'host' => array_key_exists('MAIL_HOST', $_SERVER) ? $_SERVER['MAIL_HOST'] : env('MAIL_HOST'),
11 | 'port' => array_key_exists('MAIL_PORT', $_SERVER) ? $_SERVER['MAIL_PORT'] : env('MAIL_PORT'),
12 | 'encryption' => array_key_exists('MAIL_ENCRYPTION', $_SERVER) ? $_SERVER['MAIL_ENCRYPTION'] : env('MAIL_ENCRYPTION'),
13 | 'username' => array_key_exists('MAIL_USERNAME', $_SERVER) ? $_SERVER['MAIL_USERNAME'] : env('MAIL_USERNAME'),
14 | 'password' => array_key_exists('MAIL_PASSWORD', $_SERVER) ? $_SERVER['MAIL_PASSWORD'] : env('MAIL_PASSWORD'),
15 | 'timeout' => null,
16 | 'auth_mode' => null,
17 | ],
18 |
19 | 'ses' => [
20 | 'transport' => 'ses',
21 | ],
22 |
23 | 'mailgun' => [
24 | 'transport' => 'mailgun',
25 | ],
26 |
27 | 'postmark' => [
28 | 'transport' => 'postmark',
29 | ],
30 |
31 | 'sendmail' => [
32 | 'transport' => 'sendmail',
33 | 'path' => '/usr/sbin/sendmail -bs',
34 | ],
35 |
36 | 'log' => [
37 | 'transport' => 'log',
38 | 'channel' => env('MAIL_LOG_CHANNEL'),
39 | ],
40 |
41 | 'array' => [
42 | 'transport' => 'array',
43 | ],
44 | ],
45 |
46 | /*
47 | |--------------------------------------------------------------------------
48 | | Global "From" Address
49 | |--------------------------------------------------------------------------
50 | |
51 | | You may wish for all e-mails sent by your application to be sent from
52 | | the same address. Here, you may specify a name and address that is
53 | | used globally for all e-mails that are sent by your application.
54 | |
55 | */
56 |
57 | 'from' => [
58 | 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
59 | 'name' => env('MAIL_FROM_NAME', 'Example'),
60 | ],
61 |
62 | /*
63 | |--------------------------------------------------------------------------
64 | | Markdown Mail Settings
65 | |--------------------------------------------------------------------------
66 | |
67 | | If you are using Markdown based email rendering, you may configure your
68 | | theme and component paths here, allowing you to customize the design
69 | | of the emails. Or, you may simply stick with the Laravel defaults!
70 | |
71 | */
72 |
73 | 'markdown' => [
74 | 'theme' => 'default',
75 |
76 | 'paths' => [
77 | resource_path('views/vendor/mail'),
78 | ],
79 | ],
80 |
81 | ];
82 |
--------------------------------------------------------------------------------
/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 | ],
43 |
44 | 'beanstalkd' => [
45 | 'driver' => 'beanstalkd',
46 | 'host' => 'localhost',
47 | 'queue' => 'default',
48 | 'retry_after' => 90,
49 | 'block_for' => 0,
50 | ],
51 |
52 | 'sqs' => [
53 | 'driver' => 'sqs',
54 | 'key' => env('AWS_ACCESS_KEY_ID'),
55 | 'secret' => env('AWS_SECRET_ACCESS_KEY'),
56 | 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
57 | 'queue' => env('SQS_QUEUE', 'your-queue-name'),
58 | 'suffix' => env('SQS_SUFFIX'),
59 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
60 | ],
61 |
62 | 'redis' => [
63 | 'driver' => 'redis',
64 | 'connection' => 'default',
65 | 'queue' => env('REDIS_QUEUE', 'default'),
66 | 'retry_after' => 90,
67 | 'block_for' => null,
68 | ],
69 |
70 | ],
71 |
72 | /*
73 | |--------------------------------------------------------------------------
74 | | Failed Queue Jobs
75 | |--------------------------------------------------------------------------
76 | |
77 | | These options configure the behavior of failed queue job logging so you
78 | | can control which database and table are used to store the jobs that
79 | | have failed. You may change them to any database / table you wish.
80 | |
81 | */
82 |
83 | 'failed' => [
84 | 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'),
85 | 'database' => env('DB_CONNECTION', 'mysql'),
86 | 'table' => 'failed_jobs',
87 | ],
88 |
89 | ];
90 |
--------------------------------------------------------------------------------
/config/sanctum.php:
--------------------------------------------------------------------------------
1 | explode(',', env('SANCTUM_STATEFUL_DOMAINS', 'localhost,127.0.0.1,127.0.0.1:8000,::1')),
17 |
18 | /*
19 | |--------------------------------------------------------------------------
20 | | Expiration Minutes
21 | |--------------------------------------------------------------------------
22 | |
23 | | This value controls the number of minutes until an issued token will be
24 | | considered expired. If this value is null, personal access tokens do
25 | | not expire. This won't tweak the lifetime of first-party sessions.
26 | |
27 | */
28 |
29 | 'expiration' => null,
30 |
31 | /*
32 | |--------------------------------------------------------------------------
33 | | Sanctum Middleware
34 | |--------------------------------------------------------------------------
35 | |
36 | | When authenticating your first-party SPA with Sanctum you may need to
37 | | customize some of the middleware Sanctum uses while processing the
38 | | request. You may change the middleware listed below as required.
39 | |
40 | */
41 |
42 | 'middleware' => [
43 | 'verify_csrf_token' => App\Http\Middleware\VerifyCsrfToken::class,
44 | 'encrypt_cookies' => App\Http\Middleware\EncryptCookies::class,
45 | ],
46 |
47 | ];
48 |
--------------------------------------------------------------------------------
/config/services.php:
--------------------------------------------------------------------------------
1 | [
18 | 'domain' => env('MAILGUN_DOMAIN'),
19 | 'secret' => env('MAILGUN_SECRET'),
20 | 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
21 | ],
22 |
23 | 'postmark' => [
24 | 'token' => env('POSTMARK_TOKEN'),
25 | ],
26 |
27 | 'ses' => [
28 | 'key' => env('AWS_ACCESS_KEY_ID'),
29 | 'secret' => env('AWS_SECRET_ACCESS_KEY'),
30 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
31 | ],
32 |
33 | ];
34 |
--------------------------------------------------------------------------------
/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 immediately expire on the browser closing, set that option.
31 | |
32 | */
33 |
34 | 'lifetime' => env('SESSION_LIFETIME', 120),
35 |
36 | 'expire_on_close' => false,
37 |
38 | /*
39 | |--------------------------------------------------------------------------
40 | | Session Encryption
41 | |--------------------------------------------------------------------------
42 | |
43 | | This option allows you to easily specify that all of your session data
44 | | should be encrypted before it is stored. All encryption will be run
45 | | automatically by Laravel and you can use the Session like normal.
46 | |
47 | */
48 |
49 | 'encrypt' => false,
50 |
51 | /*
52 | |--------------------------------------------------------------------------
53 | | Session File Location
54 | |--------------------------------------------------------------------------
55 | |
56 | | When using the native session driver, we need a location where session
57 | | files may be stored. A default has been set for you but a different
58 | | location may be specified. This is only needed for file sessions.
59 | |
60 | */
61 |
62 | 'files' => storage_path('framework/sessions'),
63 |
64 | /*
65 | |--------------------------------------------------------------------------
66 | | Session Database Connection
67 | |--------------------------------------------------------------------------
68 | |
69 | | When using the "database" or "redis" session drivers, you may specify a
70 | | connection that should be used to manage these sessions. This should
71 | | correspond to a connection in your database configuration options.
72 | |
73 | */
74 |
75 | 'connection' => env('SESSION_CONNECTION', null),
76 |
77 | /*
78 | |--------------------------------------------------------------------------
79 | | Session Database Table
80 | |--------------------------------------------------------------------------
81 | |
82 | | When using the "database" session driver, you may specify the table we
83 | | should use to manage the sessions. Of course, a sensible default is
84 | | provided for you; however, you are free to change this as needed.
85 | |
86 | */
87 |
88 | 'table' => 'sessions',
89 |
90 | /*
91 | |--------------------------------------------------------------------------
92 | | Session Cache Store
93 | |--------------------------------------------------------------------------
94 | |
95 | | While using one of the framework's cache driven session backends you may
96 | | list a cache store that should be used for these sessions. This value
97 | | must match with one of the application's configured cache "stores".
98 | |
99 | | Affects: "apc", "dynamodb", "memcached", "redis"
100 | |
101 | */
102 |
103 | 'store' => env('SESSION_STORE', null),
104 |
105 | /*
106 | |--------------------------------------------------------------------------
107 | | Session Sweeping Lottery
108 | |--------------------------------------------------------------------------
109 | |
110 | | Some session drivers must manually sweep their storage location to get
111 | | rid of old sessions from storage. Here are the chances that it will
112 | | happen on a given request. By default, the odds are 2 out of 100.
113 | |
114 | */
115 |
116 | 'lottery' => [2, 100],
117 |
118 | /*
119 | |--------------------------------------------------------------------------
120 | | Session Cookie Name
121 | |--------------------------------------------------------------------------
122 | |
123 | | Here you may change the name of the cookie used to identify a session
124 | | instance by ID. The name specified here will get used every time a
125 | | new session cookie is created by the framework for every driver.
126 | |
127 | */
128 |
129 | 'cookie' => env(
130 | 'SESSION_COOKIE',
131 | Str::slug(env('APP_NAME', 'laravel'), '_').'_session'
132 | ),
133 |
134 | /*
135 | |--------------------------------------------------------------------------
136 | | Session Cookie Path
137 | |--------------------------------------------------------------------------
138 | |
139 | | The session cookie path determines the path for which the cookie will
140 | | be regarded as available. Typically, this will be the root path of
141 | | your application but you are free to change this when necessary.
142 | |
143 | */
144 |
145 | 'path' => '/',
146 |
147 | /*
148 | |--------------------------------------------------------------------------
149 | | Session Cookie Domain
150 | |--------------------------------------------------------------------------
151 | |
152 | | Here you may change the domain of the cookie used to identify a session
153 | | in your application. This will determine which domains the cookie is
154 | | available to in your application. A sensible default has been set.
155 | |
156 | */
157 |
158 | 'domain' => env('SESSION_DOMAIN', null),
159 |
160 | /*
161 | |--------------------------------------------------------------------------
162 | | HTTPS Only Cookies
163 | |--------------------------------------------------------------------------
164 | |
165 | | By setting this option to true, session cookies will only be sent back
166 | | to the server if the browser has a HTTPS connection. This will keep
167 | | the cookie from being sent to you if it can not be done securely.
168 | |
169 | */
170 |
171 | 'secure' => env('SESSION_SECURE_COOKIE'),
172 |
173 | /*
174 | |--------------------------------------------------------------------------
175 | | HTTP Access Only
176 | |--------------------------------------------------------------------------
177 | |
178 | | Setting this value to true will prevent JavaScript from accessing the
179 | | value of the cookie and the cookie will only be accessible through
180 | | the HTTP protocol. You are free to modify this option if needed.
181 | |
182 | */
183 |
184 | 'http_only' => true,
185 |
186 | /*
187 | |--------------------------------------------------------------------------
188 | | Same-Site Cookies
189 | |--------------------------------------------------------------------------
190 | |
191 | | This option determines how your cookies behave when cross-site requests
192 | | take place, and can be used to mitigate CSRF attacks. By default, we
193 | | will set this value to "lax" since this is a secure default value.
194 | |
195 | | Supported: "lax", "strict", "none", null
196 | |
197 | */
198 |
199 | 'same_site' => 'lax',
200 |
201 | ];
202 |
--------------------------------------------------------------------------------
/config/view.php:
--------------------------------------------------------------------------------
1 | [
17 | resource_path('views'),
18 | ],
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Compiled View Path
23 | |--------------------------------------------------------------------------
24 | |
25 | | This option determines where all the compiled Blade templates will be
26 | | stored for your application. Typically, this is within the storage
27 | | directory. However, as usual, you are free to change this value.
28 | |
29 | */
30 |
31 | 'compiled' => env(
32 | 'VIEW_COMPILED_PATH',
33 | realpath(storage_path('framework/views'))
34 | ),
35 |
36 | ];
37 |
--------------------------------------------------------------------------------
/database/.gitignore:
--------------------------------------------------------------------------------
1 | *.sqlite
2 | *.sqlite-journal
3 |
--------------------------------------------------------------------------------
/database/factories/UserFactory.php:
--------------------------------------------------------------------------------
1 | $this->faker->name,
27 | 'email' => $this->faker->unique()->safeEmail,
28 | 'email_verified_at' => now(),
29 | 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
30 | 'remember_token' => Str::random(10),
31 | ];
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/database/migrations/2014_10_12_000000_create_users_table.php:
--------------------------------------------------------------------------------
1 | id();
18 | $table->string('name');
19 | $table->string('email')->unique();
20 | $table->timestamp('email_verified_at')->nullable();
21 | $table->string('password');
22 | $table->rememberToken();
23 | $table->foreignId('current_team_id')->nullable();
24 | $table->text('profile_photo_path')->nullable();
25 | $table->timestamps();
26 | });
27 | }
28 |
29 | /**
30 | * Reverse the migrations.
31 | *
32 | * @return void
33 | */
34 | public function down()
35 | {
36 | Schema::dropIfExists('users');
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/database/migrations/2014_10_12_100000_create_password_resets_table.php:
--------------------------------------------------------------------------------
1 | string('email')->index();
18 | $table->string('token');
19 | $table->timestamp('created_at')->nullable();
20 | });
21 | }
22 |
23 | /**
24 | * Reverse the migrations.
25 | *
26 | * @return void
27 | */
28 | public function down()
29 | {
30 | Schema::dropIfExists('password_resets');
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/database/migrations/2014_10_12_200000_add_two_factor_columns_to_users_table.php:
--------------------------------------------------------------------------------
1 | text('two_factor_secret')
18 | ->after('password')
19 | ->nullable();
20 |
21 | $table->text('two_factor_recovery_codes')
22 | ->after('two_factor_secret')
23 | ->nullable();
24 | });
25 | }
26 |
27 | /**
28 | * Reverse the migrations.
29 | *
30 | * @return void
31 | */
32 | public function down()
33 | {
34 | Schema::table('users', function (Blueprint $table) {
35 | $table->dropColumn('two_factor_secret', 'two_factor_recovery_codes');
36 | });
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/database/migrations/2019_08_19_000000_create_failed_jobs_table.php:
--------------------------------------------------------------------------------
1 | id();
18 | $table->string('uuid')->unique();
19 | $table->text('connection');
20 | $table->text('queue');
21 | $table->longText('payload');
22 | $table->longText('exception');
23 | $table->timestamp('failed_at')->useCurrent();
24 | });
25 | }
26 |
27 | /**
28 | * Reverse the migrations.
29 | *
30 | * @return void
31 | */
32 | public function down()
33 | {
34 | Schema::dropIfExists('failed_jobs');
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php:
--------------------------------------------------------------------------------
1 | bigIncrements('id');
18 | $table->morphs('tokenable');
19 | $table->string('name');
20 | $table->string('token', 64)->unique();
21 | $table->text('abilities')->nullable();
22 | $table->timestamp('last_used_at')->nullable();
23 | $table->timestamps();
24 | });
25 | }
26 |
27 | /**
28 | * Reverse the migrations.
29 | *
30 | * @return void
31 | */
32 | public function down()
33 | {
34 | Schema::dropIfExists('personal_access_tokens');
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/database/migrations/2020_09_27_130242_create_sessions_table.php:
--------------------------------------------------------------------------------
1 | string('id')->primary();
18 | $table->foreignId('user_id')->nullable()->index();
19 | $table->string('ip_address', 45)->nullable();
20 | $table->text('user_agent')->nullable();
21 | $table->text('payload');
22 | $table->integer('last_activity')->index();
23 | });
24 | }
25 |
26 | /**
27 | * Reverse the migrations.
28 | *
29 | * @return void
30 | */
31 | public function down()
32 | {
33 | Schema::dropIfExists('sessions');
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/database/seeders/DatabaseSeeder.php:
--------------------------------------------------------------------------------
1 | create();
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "scripts": {
4 | "dev": "npm run development",
5 | "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
6 | "watch": "npm run development -- --watch",
7 | "watch-poll": "npm run watch -- --watch-poll",
8 | "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --disable-host-check --config=node_modules/laravel-mix/setup/webpack.config.js",
9 | "prod": "npm run production",
10 | "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
11 | },
12 | "devDependencies": {
13 | "@tailwindcss/ui": "^0.5.0",
14 | "axios": "^0.19",
15 | "cross-env": "^7.0",
16 | "laravel-mix": "^5.0.1",
17 | "lodash": "^4.17.19",
18 | "postcss-import": "^12.0.1",
19 | "resolve-url-loader": "^3.1.0",
20 | "tailwindcss": "^1.3.0",
21 | "vue-template-compiler": "^2.6.12"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/phpunit.xml:
--------------------------------------------------------------------------------
1 |
2 |
21 | {{ __('When two factor authentication is enabled, you will be prompted for a secure, random token during authentication. You may retrieve this token from your phone\'s Google Authenticator application.') }} 22 |
23 |29 | {{ __('Two factor authentication is now enabled. Scan the following QR code using your phone\'s authenticator application.') }} 30 |
31 |41 | {{ __('Store these recovery codes in a secure password manager. They can be used to recover access to your account if your two factor authentication device is lost.') }} 42 |
43 |