가. clear 종류
php artisan config:clear
php artisan cache:clear1. Configuration Cache
$ php artisan config:clear
$ php artisan config:cache
2. Route Caching
$ php artisan route:clear
$ php artisan route:cache
3. Views Caching
$ php artisan view:clear
$ php artisan view:cache
4. Events Cache
$ php artisan event:clear
$ php artisan event:cache
5. Application Cache
$ php artisan cache:clear
6. Clearing All Cache
$ php artisan optimize:clear
php artisan config:clear
php artisan cache:clear
php artisan config:clear
php artisan cache:clear
https://dev.to/kasenda/use-repository-pattern-with-laravel-e8h
//app/Providers/AppServiceProvider.php
public function register()
{
//daekyu.park debug..
if ($this->app->environment() !== 'production') {
\\Event::listen('Illuminate\\Database\\Events\\QueryExecuted', function ($query) {
\\Log::channel('sql')->info([
'sql' => $query->sql,
'bindings' => $query->bindings,
'time' => $query->time,
]);
});
}
}
//config/logging.php
//daekyu.park debug..
'sql' => [
'driver' => 'daily',
'path' => storage_path('logs/sql.log'),
'level' => 'debug',
'days' => 14,
],