Commit 14cb17b6 authored by Le Dinh Trung's avatar Le Dinh Trung

Merge branch 'dev' of...

Merge branch 'dev' of https://gitlab.kiaisoft.com/kiaisoft.huan.nguyen1/project_laravel into feature/validation
parents 8c50408c 64e28c2c
...@@ -17,7 +17,7 @@ DB_PASSWORD= ...@@ -17,7 +17,7 @@ DB_PASSWORD=
BROADCAST_DRIVER=log BROADCAST_DRIVER=log
CACHE_DRIVER=file CACHE_DRIVER=file
FILESYSTEM_DISK=local FILESYSTEM_DRIVER=local
QUEUE_CONNECTION=sync QUEUE_CONNECTION=sync
SESSION_DRIVER=file SESSION_DRIVER=file
SESSION_LIFETIME=120 SESSION_LIFETIME=120
...@@ -34,7 +34,7 @@ MAIL_PORT=1025 ...@@ -34,7 +34,7 @@ MAIL_PORT=1025
MAIL_USERNAME=null MAIL_USERNAME=null
MAIL_PASSWORD=null MAIL_PASSWORD=null
MAIL_ENCRYPTION=null MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS="hello@example.com" MAIL_FROM_ADDRESS=null
MAIL_FROM_NAME="${APP_NAME}" MAIL_FROM_NAME="${APP_NAME}"
AWS_ACCESS_KEY_ID= AWS_ACCESS_KEY_ID=
...@@ -46,13 +46,7 @@ AWS_USE_PATH_STYLE_ENDPOINT=false ...@@ -46,13 +46,7 @@ AWS_USE_PATH_STYLE_ENDPOINT=false
PUSHER_APP_ID= PUSHER_APP_ID=
PUSHER_APP_KEY= PUSHER_APP_KEY=
PUSHER_APP_SECRET= PUSHER_APP_SECRET=
PUSHER_HOST=
PUSHER_PORT=443
PUSHER_SCHEME=https
PUSHER_APP_CLUSTER=mt1 PUSHER_APP_CLUSTER=mt1
VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}" MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
VITE_PUSHER_HOST="${PUSHER_HOST}" MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
VITE_PUSHER_PORT="${PUSHER_PORT}"
VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
...@@ -8,4 +8,3 @@ ...@@ -8,4 +8,3 @@
/.github export-ignore /.github export-ignore
CHANGELOG.md export-ignore CHANGELOG.md export-ignore
.styleci.yml export-ignore
/node_modules /node_modules
/public/build
/public/hot /public/hot
/public/storage /public/storage
/storage/*.key /storage/*.key
...@@ -7,9 +6,9 @@ ...@@ -7,9 +6,9 @@
.env .env
.env.backup .env.backup
.phpunit.result.cache .phpunit.result.cache
docker-compose.override.yml
Homestead.json Homestead.json
Homestead.yaml Homestead.yaml
auth.json
npm-debug.log npm-debug.log
yarn-error.log yarn-error.log
/.idea /.idea
......
php:
preset: laravel
version: 8
disabled:
- no_unused_imports
finder:
not-name:
- index.php
- server.php
js:
finder:
not-name:
- webpack.mix.js
css: true
<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg" width="400" alt="Laravel Logo"></a></p> <p align="center"><a href="https://laravel.com" target="_blank"><img src="https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg" width="400"></a></p>
<p align="center"> <p align="center">
<a href="https://travis-ci.org/laravel/framework"><img src="https://travis-ci.org/laravel/framework.svg" alt="Build Status"></a> <a href="https://travis-ci.org/laravel/framework"><img src="https://travis-ci.org/laravel/framework.svg" alt="Build Status"></a>
...@@ -25,7 +25,7 @@ Laravel is accessible, powerful, and provides tools required for large, robust a ...@@ -25,7 +25,7 @@ Laravel is accessible, powerful, and provides tools required for large, robust a
Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework. Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains over 2000 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library. If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains over 1500 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
## Laravel Sponsors ## Laravel Sponsors
......
...@@ -7,26 +7,17 @@ ...@@ -7,26 +7,17 @@
class Handler extends ExceptionHandler class Handler extends ExceptionHandler
{ {
/**
* A list of exception types with their corresponding custom log levels.
*
* @var array<class-string<\Throwable>, \Psr\Log\LogLevel::*>
*/
protected $levels = [
//
];
/** /**
* A list of the exception types that are not reported. * A list of the exception types that are not reported.
* *
* @var array<int, class-string<\Throwable>> * @var array<int, class-string<Throwable>>
*/ */
protected $dontReport = [ protected $dontReport = [
// //
]; ];
/** /**
* A list of the inputs that are never flashed to the session on validation exceptions. * A list of the inputs that are never flashed for validation exceptions.
* *
* @var array<int, string> * @var array<int, string>
*/ */
......
...@@ -16,7 +16,7 @@ class Kernel extends HttpKernel ...@@ -16,7 +16,7 @@ class Kernel extends HttpKernel
protected $middleware = [ protected $middleware = [
// \App\Http\Middleware\TrustHosts::class, // \App\Http\Middleware\TrustHosts::class,
\App\Http\Middleware\TrustProxies::class, \App\Http\Middleware\TrustProxies::class,
\Illuminate\Http\Middleware\HandleCors::class, \Fruitcake\Cors\HandleCors::class,
\App\Http\Middleware\PreventRequestsDuringMaintenance::class, \App\Http\Middleware\PreventRequestsDuringMaintenance::class,
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
\App\Http\Middleware\TrimStrings::class, \App\Http\Middleware\TrimStrings::class,
...@@ -33,6 +33,7 @@ class Kernel extends HttpKernel ...@@ -33,6 +33,7 @@ class Kernel extends HttpKernel
\App\Http\Middleware\EncryptCookies::class, \App\Http\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class, \Illuminate\Session\Middleware\StartSession::class,
// \Illuminate\Session\Middleware\AuthenticateSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class, \Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\VerifyCsrfToken::class, \App\Http\Middleware\VerifyCsrfToken::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class, \Illuminate\Routing\Middleware\SubstituteBindings::class,
...@@ -55,12 +56,11 @@ class Kernel extends HttpKernel ...@@ -55,12 +56,11 @@ class Kernel extends HttpKernel
protected $routeMiddleware = [ protected $routeMiddleware = [
'auth' => \App\Http\Middleware\Authenticate::class, 'auth' => \App\Http\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::class,
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
'can' => \Illuminate\Auth\Middleware\Authorize::class, 'can' => \Illuminate\Auth\Middleware\Authorize::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class, 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
'signed' => \App\Http\Middleware\ValidateSignature::class, 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
]; ];
......
<?php
namespace App\Http\Middleware;
use Illuminate\Routing\Middleware\ValidateSignature as Middleware;
class ValidateSignature extends Middleware
{
/**
* The names of the query string parameters that should be ignored.
*
* @var array<int, string>
*/
protected $except = [
// 'fbclid',
// 'utm_campaign',
// 'utm_content',
// 'utm_medium',
// 'utm_source',
// 'utm_term',
];
}
...@@ -2,13 +2,43 @@ ...@@ -2,13 +2,43 @@
namespace App\Models; namespace App\Models;
// use Illuminate\Contracts\Auth\MustVerifyEmail; use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum\HasApiTokens;
class User extends Model class User extends Authenticatable
{ {
public $timestamps = FALSE; use HasApiTokens, HasFactory, Notifiable;
protected $table = 'users';
protected $fillable = ['phone', 'name', 'password'];
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'name',
'email',
'password',
];
/**
* The attributes that should be hidden for serialization.
*
* @var array<int, string>
*/
protected $hidden = [
'password',
'remember_token',
];
/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
'email_verified_at' => 'datetime',
];
} }
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
namespace App\Providers; namespace App\Providers;
// use Illuminate\Support\Facades\Gate;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Gate;
class AuthServiceProvider extends ServiceProvider class AuthServiceProvider extends ServiceProvider
{ {
/** /**
* The model to policy mappings for the application. * The policy mappings for the application.
* *
* @var array<class-string, class-string> * @var array<class-string, class-string>
*/ */
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
class EventServiceProvider extends ServiceProvider class EventServiceProvider extends ServiceProvider
{ {
/** /**
* The event to listener mappings for the application. * The event listener mappings for the application.
* *
* @var array<class-string, array<int, class-string>> * @var array<class-string, array<int, class-string>>
*/ */
...@@ -29,14 +29,4 @@ public function boot() ...@@ -29,14 +29,4 @@ public function boot()
{ {
// //
} }
/**
* Determine if events and listeners should be automatically discovered.
*
* @return bool
*/
public function shouldDiscoverEvents()
{
return false;
}
} }
...@@ -13,14 +13,23 @@ class RouteServiceProvider extends ServiceProvider ...@@ -13,14 +13,23 @@ class RouteServiceProvider extends ServiceProvider
/** /**
* The path to the "home" route for your application. * The path to the "home" route for your application.
* *
* Typically, users are redirected here after authentication. * This is used by Laravel authentication to redirect users after login.
* *
* @var string * @var string
*/ */
public const HOME = '/home'; public const HOME = '/home';
/** /**
* Define your route model bindings, pattern filters, and other route configuration. * The controller namespace for the application.
*
* When present, controller route declarations will automatically be prefixed with this namespace.
*
* @var string|null
*/
// protected $namespace = 'App\\Http\\Controllers';
/**
* Define your route model bindings, pattern filters, etc.
* *
* @return void * @return void
*/ */
...@@ -29,11 +38,13 @@ public function boot() ...@@ -29,11 +38,13 @@ public function boot()
$this->configureRateLimiting(); $this->configureRateLimiting();
$this->routes(function () { $this->routes(function () {
Route::middleware('api') Route::prefix('api')
->prefix('api') ->middleware('api')
->namespace($this->namespace)
->group(base_path('routes/api.php')); ->group(base_path('routes/api.php'));
Route::middleware('web') Route::middleware('web')
->namespace($this->namespace)
->group(base_path('routes/web.php')); ->group(base_path('routes/web.php'));
}); });
} }
...@@ -46,7 +57,7 @@ public function boot() ...@@ -46,7 +57,7 @@ public function boot()
protected function configureRateLimiting() protected function configureRateLimiting()
{ {
RateLimiter::for('api', function (Request $request) { RateLimiter::for('api', function (Request $request) {
return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip()); return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip());
}); });
} }
} }
...@@ -5,20 +5,20 @@ ...@@ -5,20 +5,20 @@
"keywords": ["framework", "laravel"], "keywords": ["framework", "laravel"],
"license": "MIT", "license": "MIT",
"require": { "require": {
"php": "^8.0.2", "php": "^7.3|^8.0",
"guzzlehttp/guzzle": "^7.2", "fruitcake/laravel-cors": "^2.0",
"laravel/framework": "^9.19", "guzzlehttp/guzzle": "^7.0.1",
"laravel/sanctum": "^3.0", "laravel/framework": "^8.75",
"laravel/tinker": "^2.7" "laravel/sanctum": "^2.11",
"laravel/tinker": "^2.5"
}, },
"require-dev": { "require-dev": {
"facade/ignition": "^2.5",
"fakerphp/faker": "^1.9.1", "fakerphp/faker": "^1.9.1",
"laravel/pint": "^1.0",
"laravel/sail": "^1.0.1", "laravel/sail": "^1.0.1",
"mockery/mockery": "^1.4.4", "mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^6.1", "nunomaduro/collision": "^5.10",
"phpunit/phpunit": "^9.5.10", "phpunit/phpunit": "^9.5.10"
"spatie/laravel-ignition": "^1.0"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
...@@ -55,10 +55,7 @@ ...@@ -55,10 +55,7 @@
"config": { "config": {
"optimize-autoloader": true, "optimize-autoloader": true,
"preferred-install": "dist", "preferred-install": "dist",
"sort-packages": true, "sort-packages": true
"allow-plugins": {
"pestphp/pest-plugin": true
}
}, },
"minimum-stability": "dev", "minimum-stability": "dev",
"prefer-stable": true "prefer-stable": true
......
This source diff could not be displayed because it is too large. You can view the blob instead.
<?php <?php
use Illuminate\Support\Facades\Facade;
return [ return [
/* /*
...@@ -56,7 +54,7 @@ ...@@ -56,7 +54,7 @@
'url' => env('APP_URL', 'http://localhost'), 'url' => env('APP_URL', 'http://localhost'),
'asset_url' => env('ASSET_URL'), 'asset_url' => env('ASSET_URL', null),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
...@@ -125,24 +123,6 @@ ...@@ -125,24 +123,6 @@
'cipher' => 'AES-256-CBC', 'cipher' => 'AES-256-CBC',
/*
|--------------------------------------------------------------------------
| Maintenance Mode Driver
|--------------------------------------------------------------------------
|
| These configuration options determine the driver used to determine and
| manage Laravel's "maintenance mode" status. The "cache" driver will
| allow maintenance mode to be controlled across multiple machines.
|
| Supported drivers: "file", "cache"
|
*/
'maintenance' => [
'driver' => 'file',
// 'store' => 'redis',
],
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Autoloaded Service Providers | Autoloaded Service Providers
...@@ -208,8 +188,48 @@ ...@@ -208,8 +188,48 @@
| |
*/ */
'aliases' => Facade::defaultAliases()->merge([ 'aliases' => [
// 'ExampleClass' => App\Example\ExampleClass::class,
])->toArray(), 'App' => Illuminate\Support\Facades\App::class,
'Arr' => Illuminate\Support\Arr::class,
'Artisan' => Illuminate\Support\Facades\Artisan::class,
'Auth' => Illuminate\Support\Facades\Auth::class,
'Blade' => Illuminate\Support\Facades\Blade::class,
'Broadcast' => Illuminate\Support\Facades\Broadcast::class,
'Bus' => Illuminate\Support\Facades\Bus::class,
'Cache' => Illuminate\Support\Facades\Cache::class,
'Config' => Illuminate\Support\Facades\Config::class,
'Cookie' => Illuminate\Support\Facades\Cookie::class,
'Crypt' => Illuminate\Support\Facades\Crypt::class,
'Date' => Illuminate\Support\Facades\Date::class,
'DB' => Illuminate\Support\Facades\DB::class,
'Eloquent' => Illuminate\Database\Eloquent\Model::class,
'Event' => Illuminate\Support\Facades\Event::class,
'File' => Illuminate\Support\Facades\File::class,
'Gate' => Illuminate\Support\Facades\Gate::class,
'Hash' => Illuminate\Support\Facades\Hash::class,
'Http' => Illuminate\Support\Facades\Http::class,
'Js' => Illuminate\Support\Js::class,
'Lang' => Illuminate\Support\Facades\Lang::class,
'Log' => Illuminate\Support\Facades\Log::class,
'Mail' => Illuminate\Support\Facades\Mail::class,
'Notification' => Illuminate\Support\Facades\Notification::class,
'Password' => Illuminate\Support\Facades\Password::class,
'Queue' => Illuminate\Support\Facades\Queue::class,
'RateLimiter' => Illuminate\Support\Facades\RateLimiter::class,
'Redirect' => Illuminate\Support\Facades\Redirect::class,
// 'Redis' => Illuminate\Support\Facades\Redis::class,
'Request' => Illuminate\Support\Facades\Request::class,
'Response' => Illuminate\Support\Facades\Response::class,
'Route' => Illuminate\Support\Facades\Route::class,
'Schema' => Illuminate\Support\Facades\Schema::class,
'Session' => Illuminate\Support\Facades\Session::class,
'Storage' => Illuminate\Support\Facades\Storage::class,
'Str' => Illuminate\Support\Str::class,
'URL' => Illuminate\Support\Facades\URL::class,
'Validator' => Illuminate\Support\Facades\Validator::class,
'View' => Illuminate\Support\Facades\View::class,
],
]; ];
...@@ -36,14 +36,8 @@ ...@@ -36,14 +36,8 @@
'secret' => env('PUSHER_APP_SECRET'), 'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'), 'app_id' => env('PUSHER_APP_ID'),
'options' => [ 'options' => [
'host' => env('PUSHER_HOST', 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com') ?: 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com', 'cluster' => env('PUSHER_APP_CLUSTER'),
'port' => env('PUSHER_PORT', 443), 'useTLS' => true,
'scheme' => env('PUSHER_SCHEME', 'https'),
'encrypted' => true,
'useTLS' => env('PUSHER_SCHEME', 'https') === 'https',
],
'client_options' => [
// Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html
], ],
], ],
......
...@@ -99,12 +99,12 @@ ...@@ -99,12 +99,12 @@
| Cache Key Prefix | Cache Key Prefix
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| When utilizing the APC, database, memcached, Redis, or DynamoDB cache | When utilizing a RAM based store such as APC or Memcached, there might
| stores there might be other applications using the same cache. For | be other applications utilizing the same cache. So, we'll specify a
| that reason, you may prefix every cache key to avoid collisions. | value to get prefixed to all our keys so we can avoid collisions.
| |
*/ */
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'), 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'),
]; ];
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
'charset' => 'utf8', 'charset' => 'utf8',
'prefix' => '', 'prefix' => '',
'prefix_indexes' => true, 'prefix_indexes' => true,
'search_path' => 'public', 'schema' => 'public',
'sslmode' => 'prefer', 'sslmode' => 'prefer',
], ],
...@@ -89,8 +89,6 @@ ...@@ -89,8 +89,6 @@
'charset' => 'utf8', 'charset' => 'utf8',
'prefix' => '', 'prefix' => '',
'prefix_indexes' => true, 'prefix_indexes' => true,
// 'encrypt' => env('DB_ENCRYPT', 'yes'),
// 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'),
], ],
], ],
...@@ -131,8 +129,7 @@ ...@@ -131,8 +129,7 @@
'default' => [ 'default' => [
'url' => env('REDIS_URL'), 'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'), 'host' => env('REDIS_HOST', '127.0.0.1'),
'username' => env('REDIS_USERNAME'), 'password' => env('REDIS_PASSWORD', null),
'password' => env('REDIS_PASSWORD'),
'port' => env('REDIS_PORT', '6379'), 'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_DB', '0'), 'database' => env('REDIS_DB', '0'),
], ],
...@@ -140,8 +137,7 @@ ...@@ -140,8 +137,7 @@
'cache' => [ 'cache' => [
'url' => env('REDIS_URL'), 'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'), 'host' => env('REDIS_HOST', '127.0.0.1'),
'username' => env('REDIS_USERNAME'), 'password' => env('REDIS_PASSWORD', null),
'password' => env('REDIS_PASSWORD'),
'port' => env('REDIS_PORT', '6379'), 'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_CACHE_DB', '1'), 'database' => env('REDIS_CACHE_DB', '1'),
], ],
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
| |
*/ */
'default' => env('FILESYSTEM_DISK', 'local'), 'default' => env('FILESYSTEM_DRIVER', 'local'),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
| |
| Here you may configure as many filesystem "disks" as you wish, and you | Here you may configure as many filesystem "disks" as you wish, and you
| may even configure multiple disks of the same driver. Defaults have | may even configure multiple disks of the same driver. Defaults have
| been set up for each driver as an example of the required values. | been setup for each driver as an example of the required options.
| |
| Supported Drivers: "local", "ftp", "sftp", "s3" | Supported Drivers: "local", "ftp", "sftp", "s3"
| |
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
'local' => [ 'local' => [
'driver' => 'local', 'driver' => 'local',
'root' => storage_path('app'), 'root' => storage_path('app'),
'throw' => false,
], ],
'public' => [ 'public' => [
...@@ -41,7 +40,6 @@ ...@@ -41,7 +40,6 @@
'root' => storage_path('app/public'), 'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage', 'url' => env('APP_URL').'/storage',
'visibility' => 'public', 'visibility' => 'public',
'throw' => false,
], ],
's3' => [ 's3' => [
...@@ -53,7 +51,6 @@ ...@@ -53,7 +51,6 @@
'url' => env('AWS_URL'), 'url' => env('AWS_URL'),
'endpoint' => env('AWS_ENDPOINT'), 'endpoint' => env('AWS_ENDPOINT'),
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false), 'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
'throw' => false,
], ],
], ],
......
...@@ -30,10 +30,7 @@ ...@@ -30,10 +30,7 @@
| |
*/ */
'deprecations' => [ 'deprecations' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
'trace' => false,
],
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
...@@ -81,11 +78,10 @@ ...@@ -81,11 +78,10 @@
'papertrail' => [ 'papertrail' => [
'driver' => 'monolog', 'driver' => 'monolog',
'level' => env('LOG_LEVEL', 'debug'), 'level' => env('LOG_LEVEL', 'debug'),
'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class), 'handler' => SyslogUdpHandler::class,
'handler_with' => [ 'handler_with' => [
'host' => env('PAPERTRAIL_URL'), 'host' => env('PAPERTRAIL_URL'),
'port' => env('PAPERTRAIL_PORT'), 'port' => env('PAPERTRAIL_PORT'),
'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'),
], ],
], ],
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
'username' => env('MAIL_USERNAME'), 'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'), 'password' => env('MAIL_PASSWORD'),
'timeout' => null, 'timeout' => null,
'local_domain' => env('MAIL_EHLO_DOMAIN'), 'auth_mode' => null,
], ],
'ses' => [ 'ses' => [
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
'sendmail' => [ 'sendmail' => [
'transport' => 'sendmail', 'transport' => 'sendmail',
'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'), 'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -t -i'),
], ],
'log' => [ 'log' => [
......
<?php <?php
use Laravel\Sanctum\Sanctum;
return [ return [
/* /*
...@@ -18,7 +16,7 @@ ...@@ -18,7 +16,7 @@
'stateful' => explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf( 'stateful' => explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf(
'%s%s', '%s%s',
'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1', 'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1',
Sanctum::currentApplicationUrlWithPort() env('APP_URL') ? ','.parse_url(env('APP_URL'), PHP_URL_HOST) : ''
))), ))),
/* /*
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
'domain' => env('MAILGUN_DOMAIN'), 'domain' => env('MAILGUN_DOMAIN'),
'secret' => env('MAILGUN_SECRET'), 'secret' => env('MAILGUN_SECRET'),
'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
'scheme' => 'https',
], ],
'postmark' => [ 'postmark' => [
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
| |
*/ */
'connection' => env('SESSION_CONNECTION'), 'connection' => env('SESSION_CONNECTION', null),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
| |
*/ */
'store' => env('SESSION_STORE'), 'store' => env('SESSION_STORE', null),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
...@@ -155,7 +155,7 @@ ...@@ -155,7 +155,7 @@
| |
*/ */
'domain' => env('SESSION_DOMAIN'), 'domain' => env('SESSION_DOMAIN', null),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
......
...@@ -5,21 +5,18 @@ ...@@ -5,21 +5,18 @@
use Illuminate\Database\Eloquent\Factories\Factory; use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str; use Illuminate\Support\Str;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
*/
class UserFactory extends Factory class UserFactory extends Factory
{ {
/** /**
* Define the model's default state. * Define the model's default state.
* *
* @return array<string, mixed> * @return array
*/ */
public function definition() public function definition()
{ {
return [ return [
'name' => fake()->name(), 'name' => $this->faker->name(),
'email' => fake()->unique()->safeEmail(), 'email' => $this->faker->unique()->safeEmail(),
'email_verified_at' => now(), 'email_verified_at' => now(),
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
'remember_token' => Str::random(10), 'remember_token' => Str::random(10),
...@@ -29,12 +26,14 @@ public function definition() ...@@ -29,12 +26,14 @@ public function definition()
/** /**
* Indicate that the model's email address should be unverified. * Indicate that the model's email address should be unverified.
* *
* @return static * @return \Illuminate\Database\Eloquent\Factories\Factory
*/ */
public function unverified() public function unverified()
{ {
return $this->state(fn (array $attributes) => [ return $this->state(function (array $attributes) {
'email_verified_at' => null, return [
]); 'email_verified_at' => null,
];
});
} }
} }
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
return new class extends Migration class CreateUsersTable extends Migration
{ {
/** /**
* Run the migrations. * Run the migrations.
...@@ -33,4 +33,4 @@ public function down() ...@@ -33,4 +33,4 @@ public function down()
{ {
Schema::dropIfExists('users'); Schema::dropIfExists('users');
} }
}; }
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
return new class extends Migration class CreatePasswordResetsTable extends Migration
{ {
/** /**
* Run the migrations. * Run the migrations.
...@@ -29,4 +29,4 @@ public function down() ...@@ -29,4 +29,4 @@ public function down()
{ {
Schema::dropIfExists('password_resets'); Schema::dropIfExists('password_resets');
} }
}; }
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
return new class extends Migration class CreateFailedJobsTable extends Migration
{ {
/** /**
* Run the migrations. * Run the migrations.
...@@ -33,4 +33,4 @@ public function down() ...@@ -33,4 +33,4 @@ public function down()
{ {
Schema::dropIfExists('failed_jobs'); Schema::dropIfExists('failed_jobs');
} }
}; }
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
return new class extends Migration class CreatePersonalAccessTokensTable extends Migration
{ {
/** /**
* Run the migrations. * Run the migrations.
...@@ -20,7 +20,6 @@ public function up() ...@@ -20,7 +20,6 @@ public function up()
$table->string('token', 64)->unique(); $table->string('token', 64)->unique();
$table->text('abilities')->nullable(); $table->text('abilities')->nullable();
$table->timestamp('last_used_at')->nullable(); $table->timestamp('last_used_at')->nullable();
$table->timestamp('expires_at')->nullable();
$table->timestamps(); $table->timestamps();
}); });
} }
...@@ -34,4 +33,4 @@ public function down() ...@@ -34,4 +33,4 @@ public function down()
{ {
Schema::dropIfExists('personal_access_tokens'); Schema::dropIfExists('personal_access_tokens');
} }
}; }
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
namespace Database\Seeders; namespace Database\Seeders;
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder; use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder class DatabaseSeeder extends Seeder
...@@ -15,10 +14,5 @@ class DatabaseSeeder extends Seeder ...@@ -15,10 +14,5 @@ class DatabaseSeeder extends Seeder
public function run() public function run()
{ {
// \App\Models\User::factory(10)->create(); // \App\Models\User::factory(10)->create();
// \App\Models\User::factory()->create([
// 'name' => 'Test User',
// 'email' => 'test@example.com',
// ]);
} }
} }
{ {
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "vite", "dev": "npm run development",
"build": "vite build" "development": "mix",
"watch": "mix watch",
"watch-poll": "mix watch -- --watch-options-poll=1000",
"hot": "mix watch --hot",
"prod": "npm run production",
"production": "mix --production"
}, },
"devDependencies": { "devDependencies": {
"axios": "^0.27", "axios": "^0.21",
"laravel-vite-plugin": "^0.6.0", "laravel-mix": "^6.0.6",
"lodash": "^4.17.19", "lodash": "^4.17.19",
"postcss": "^8.1.14", "postcss": "^8.1.14"
"vite": "^3.0.0"
} }
} }
...@@ -18,14 +18,14 @@ ...@@ -18,14 +18,14 @@
</include> </include>
</coverage> </coverage>
<php> <php>
<env name="APP_ENV" value="testing"/> <server name="APP_ENV" value="testing"/>
<env name="BCRYPT_ROUNDS" value="4"/> <server name="BCRYPT_ROUNDS" value="4"/>
<env name="CACHE_DRIVER" value="array"/> <server name="CACHE_DRIVER" value="array"/>
<!-- <env name="DB_CONNECTION" value="sqlite"/> --> <!-- <server name="DB_CONNECTION" value="sqlite"/> -->
<!-- <env name="DB_DATABASE" value=":memory:"/> --> <!-- <server name="DB_DATABASE" value=":memory:"/> -->
<env name="MAIL_MAILER" value="array"/> <server name="MAIL_MAILER" value="array"/>
<env name="QUEUE_CONNECTION" value="sync"/> <server name="QUEUE_CONNECTION" value="sync"/>
<env name="SESSION_DRIVER" value="array"/> <server name="SESSION_DRIVER" value="array"/>
<env name="TELESCOPE_ENABLED" value="false"/> <server name="TELESCOPE_ENABLED" value="false"/>
</php> </php>
</phpunit> </phpunit>
import './bootstrap'; require('./bootstrap');
import _ from 'lodash'; window._ = require('lodash');
window._ = _;
/** /**
* We'll load the axios HTTP library which allows us to easily issue requests * We'll load the axios HTTP library which allows us to easily issue requests
...@@ -7,8 +6,7 @@ window._ = _; ...@@ -7,8 +6,7 @@ window._ = _;
* CSRF token as a header based on the value of the "XSRF" token cookie. * CSRF token as a header based on the value of the "XSRF" token cookie.
*/ */
import axios from 'axios'; window.axios = require('axios');
window.axios = axios;
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
...@@ -20,15 +18,11 @@ window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; ...@@ -20,15 +18,11 @@ window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
// import Echo from 'laravel-echo'; // import Echo from 'laravel-echo';
// import Pusher from 'pusher-js'; // window.Pusher = require('pusher-js');
// window.Pusher = Pusher;
// window.Echo = new Echo({ // window.Echo = new Echo({
// broadcaster: 'pusher', // broadcaster: 'pusher',
// key: import.meta.env.VITE_PUSHER_APP_KEY, // key: process.env.MIX_PUSHER_APP_KEY,
// wsHost: import.meta.env.VITE_PUSHER_HOST ?? `ws-${import.meta.env.VITE_PUSHER_APP_CLUSTER}.pusher.com`, // cluster: process.env.MIX_PUSHER_APP_CLUSTER,
// wsPort: import.meta.env.VITE_PUSHER_PORT ?? 80, // forceTLS: true
// wssPort: import.meta.env.VITE_PUSHER_PORT ?? 443,
// forceTLS: (import.meta.env.VITE_PUSHER_SCHEME ?? 'https') === 'https',
// enabledTransports: ['ws', 'wss'],
// }); // });
...@@ -25,10 +25,10 @@ ...@@ -25,10 +25,10 @@
'before' => 'The :attribute must be a date before :date.', 'before' => 'The :attribute must be a date before :date.',
'before_or_equal' => 'The :attribute must be a date before or equal to :date.', 'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
'between' => [ 'between' => [
'array' => 'The :attribute must have between :min and :max items.',
'file' => 'The :attribute must be between :min and :max kilobytes.',
'numeric' => 'The :attribute must be between :min and :max.', 'numeric' => 'The :attribute must be between :min and :max.',
'file' => 'The :attribute must be between :min and :max kilobytes.',
'string' => 'The :attribute must be between :min and :max characters.', 'string' => 'The :attribute must be between :min and :max characters.',
'array' => 'The :attribute must have between :min and :max items.',
], ],
'boolean' => 'The :attribute field must be true or false.', 'boolean' => 'The :attribute field must be true or false.',
'confirmed' => 'The :attribute confirmation does not match.', 'confirmed' => 'The :attribute confirmation does not match.',
...@@ -43,8 +43,6 @@ ...@@ -43,8 +43,6 @@
'digits_between' => 'The :attribute must be between :min and :max digits.', 'digits_between' => 'The :attribute must be between :min and :max digits.',
'dimensions' => 'The :attribute has invalid image dimensions.', 'dimensions' => 'The :attribute has invalid image dimensions.',
'distinct' => 'The :attribute field has a duplicate value.', 'distinct' => 'The :attribute field has a duplicate value.',
'doesnt_end_with' => 'The :attribute may not end with one of the following: :values.',
'doesnt_start_with' => 'The :attribute may not start with one of the following: :values.',
'email' => 'The :attribute must be a valid email address.', 'email' => 'The :attribute must be a valid email address.',
'ends_with' => 'The :attribute must end with one of the following: :values.', 'ends_with' => 'The :attribute must end with one of the following: :values.',
'enum' => 'The selected :attribute is invalid.', 'enum' => 'The selected :attribute is invalid.',
...@@ -52,16 +50,16 @@ ...@@ -52,16 +50,16 @@
'file' => 'The :attribute must be a file.', 'file' => 'The :attribute must be a file.',
'filled' => 'The :attribute field must have a value.', 'filled' => 'The :attribute field must have a value.',
'gt' => [ 'gt' => [
'array' => 'The :attribute must have more than :value items.',
'file' => 'The :attribute must be greater than :value kilobytes.',
'numeric' => 'The :attribute must be greater than :value.', 'numeric' => 'The :attribute must be greater than :value.',
'file' => 'The :attribute must be greater than :value kilobytes.',
'string' => 'The :attribute must be greater than :value characters.', 'string' => 'The :attribute must be greater than :value characters.',
'array' => 'The :attribute must have more than :value items.',
], ],
'gte' => [ 'gte' => [
'array' => 'The :attribute must have :value items or more.',
'file' => 'The :attribute must be greater than or equal to :value kilobytes.',
'numeric' => 'The :attribute must be greater than or equal to :value.', 'numeric' => 'The :attribute must be greater than or equal to :value.',
'file' => 'The :attribute must be greater than or equal to :value kilobytes.',
'string' => 'The :attribute must be greater than or equal to :value characters.', 'string' => 'The :attribute must be greater than or equal to :value characters.',
'array' => 'The :attribute must have :value items or more.',
], ],
'image' => 'The :attribute must be an image.', 'image' => 'The :attribute must be an image.',
'in' => 'The selected :attribute is invalid.', 'in' => 'The selected :attribute is invalid.',
...@@ -72,45 +70,37 @@ ...@@ -72,45 +70,37 @@
'ipv6' => 'The :attribute must be a valid IPv6 address.', 'ipv6' => 'The :attribute must be a valid IPv6 address.',
'json' => 'The :attribute must be a valid JSON string.', 'json' => 'The :attribute must be a valid JSON string.',
'lt' => [ 'lt' => [
'array' => 'The :attribute must have less than :value items.',
'file' => 'The :attribute must be less than :value kilobytes.',
'numeric' => 'The :attribute must be less than :value.', 'numeric' => 'The :attribute must be less than :value.',
'file' => 'The :attribute must be less than :value kilobytes.',
'string' => 'The :attribute must be less than :value characters.', 'string' => 'The :attribute must be less than :value characters.',
'array' => 'The :attribute must have less than :value items.',
], ],
'lte' => [ 'lte' => [
'array' => 'The :attribute must not have more than :value items.',
'file' => 'The :attribute must be less than or equal to :value kilobytes.',
'numeric' => 'The :attribute must be less than or equal to :value.', 'numeric' => 'The :attribute must be less than or equal to :value.',
'file' => 'The :attribute must be less than or equal to :value kilobytes.',
'string' => 'The :attribute must be less than or equal to :value characters.', 'string' => 'The :attribute must be less than or equal to :value characters.',
'array' => 'The :attribute must not have more than :value items.',
], ],
'mac_address' => 'The :attribute must be a valid MAC address.', 'mac_address' => 'The :attribute must be a valid MAC address.',
'max' => [ 'max' => [
'array' => 'The :attribute must not have more than :max items.',
'file' => 'The :attribute must not be greater than :max kilobytes.',
'numeric' => 'The :attribute must not be greater than :max.', 'numeric' => 'The :attribute must not be greater than :max.',
'file' => 'The :attribute must not be greater than :max kilobytes.',
'string' => 'The :attribute must not be greater than :max characters.', 'string' => 'The :attribute must not be greater than :max characters.',
'array' => 'The :attribute must not have more than :max items.',
], ],
'max_digits' => 'The :attribute must not have more than :max digits.',
'mimes' => 'The :attribute must be a file of type: :values.', 'mimes' => 'The :attribute must be a file of type: :values.',
'mimetypes' => 'The :attribute must be a file of type: :values.', 'mimetypes' => 'The :attribute must be a file of type: :values.',
'min' => [ 'min' => [
'array' => 'The :attribute must have at least :min items.',
'file' => 'The :attribute must be at least :min kilobytes.',
'numeric' => 'The :attribute must be at least :min.', 'numeric' => 'The :attribute must be at least :min.',
'file' => 'The :attribute must be at least :min kilobytes.',
'string' => 'The :attribute must be at least :min characters.', 'string' => 'The :attribute must be at least :min characters.',
'array' => 'The :attribute must have at least :min items.',
], ],
'min_digits' => 'The :attribute must have at least :min digits.',
'multiple_of' => 'The :attribute must be a multiple of :value.', 'multiple_of' => 'The :attribute must be a multiple of :value.',
'not_in' => 'The selected :attribute is invalid.', 'not_in' => 'The selected :attribute is invalid.',
'not_regex' => 'The :attribute format is invalid.', 'not_regex' => 'The :attribute format is invalid.',
'numeric' => 'The :attribute must be a number.', 'numeric' => 'The :attribute must be a number.',
'password' => [ 'password' => 'The password is incorrect.',
'letters' => 'The :attribute must contain at least one letter.',
'mixed' => 'The :attribute must contain at least one uppercase and one lowercase letter.',
'numbers' => 'The :attribute must contain at least one number.',
'symbols' => 'The :attribute must contain at least one symbol.',
'uncompromised' => 'The given :attribute has appeared in a data leak. Please choose a different :attribute.',
],
'present' => 'The :attribute field must be present.', 'present' => 'The :attribute field must be present.',
'prohibited' => 'The :attribute field is prohibited.', 'prohibited' => 'The :attribute field is prohibited.',
'prohibited_if' => 'The :attribute field is prohibited when :other is :value.', 'prohibited_if' => 'The :attribute field is prohibited when :other is :value.',
...@@ -127,10 +117,10 @@ ...@@ -127,10 +117,10 @@
'required_without_all' => 'The :attribute field is required when none of :values are present.', 'required_without_all' => 'The :attribute field is required when none of :values are present.',
'same' => 'The :attribute and :other must match.', 'same' => 'The :attribute and :other must match.',
'size' => [ 'size' => [
'array' => 'The :attribute must contain :size items.',
'file' => 'The :attribute must be :size kilobytes.',
'numeric' => 'The :attribute must be :size.', 'numeric' => 'The :attribute must be :size.',
'file' => 'The :attribute must be :size kilobytes.',
'string' => 'The :attribute must be :size characters.', 'string' => 'The :attribute must be :size characters.',
'array' => 'The :attribute must contain :size items.',
], ],
'starts_with' => 'The :attribute must start with one of the following: :values.', 'starts_with' => 'The :attribute must start with one of the following: :values.',
'string' => 'The :attribute must be a string.', 'string' => 'The :attribute must be a string.',
......
This diff is collapsed.
<?php <?php
use App\Http\Controllers\UserController;
use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\Route;
/* /*
...@@ -13,15 +12,7 @@ ...@@ -13,15 +12,7 @@
| contains the "web" middleware group. Now create something great! | contains the "web" middleware group. Now create something great!
| |
*/ */
Route::post('/register', [UserController::class, 'register']);
Route::get('/register', function () { Route::get('/', function () {
return view('register'); return view('welcome');
}); });
Route::get('/login', function () {
return view('login');
});
Route::post('/login', [UserController::class, 'login']);
<?php
/**
* Laravel - A PHP Framework For Web Artisans
*
* @package Laravel
* @author Taylor Otwell <taylor@laravel.com>
*/
$uri = urldecode(
parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) ?? ''
);
// This file allows us to emulate Apache's "mod_rewrite" functionality from the
// built-in PHP web server. This provides a convenient way to test a Laravel
// application without having installed a "real" web server software here.
if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) {
return false;
}
require_once __DIR__.'/public/index.php';
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
namespace Tests\Feature; namespace Tests\Feature;
// use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase; use Tests\TestCase;
class ExampleTest extends TestCase class ExampleTest extends TestCase
...@@ -12,7 +12,7 @@ class ExampleTest extends TestCase ...@@ -12,7 +12,7 @@ class ExampleTest extends TestCase
* *
* @return void * @return void
*/ */
public function test_the_application_returns_a_successful_response() public function test_example()
{ {
$response = $this->get('/'); $response = $this->get('/');
......
...@@ -11,7 +11,7 @@ class ExampleTest extends TestCase ...@@ -11,7 +11,7 @@ class ExampleTest extends TestCase
* *
* @return void * @return void
*/ */
public function test_that_true_is_true() public function test_example()
{ {
$this->assertTrue(true); $this->assertTrue(true);
} }
......
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
export default defineConfig({
plugins: [
laravel({
input: ['resources/css/app.css', 'resources/js/app.js'],
refresh: true,
}),
],
});
const mix = require('laravel-mix');
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel applications. By default, we are compiling the CSS
| file for the application as well as bundling up all the JS files.
|
*/
mix.js('resources/js/app.js', 'public/js')
.postCss('resources/css/app.css', 'public/css', [
//
]);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment