Skip to content

Commit

Permalink
Update the Laravel related skeleton files
Browse files Browse the repository at this point in the history
  • Loading branch information
davorminchorov committed Apr 19, 2023
1 parent 39ef084 commit 52e4884
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 10 deletions.
9 changes: 9 additions & 0 deletions App/Infrastructure/Laravel/Config/logging.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use Monolog\Handler\NullHandler;
use Monolog\Handler\StreamHandler;
use Monolog\Handler\SyslogUdpHandler;
use Monolog\Processor\PsrLogMessageProcessor;

return [

Expand Down Expand Up @@ -61,13 +62,15 @@
'driver' => 'single',
'path' => storage_path(path: 'Logs/laravel.log'),
'level' => env(key: 'LOG_LEVEL', default: 'debug'),
'replace_placeholders' => true,
],

'daily' => [
'driver' => 'daily',
'path' => storage_path(path: 'Logs/laravel.log'),
'level' => env(key: 'LOG_LEVEL', default: 'debug'),
'days' => 14,
'replace_placeholders' => true,
],

'slack' => [
Expand All @@ -76,6 +79,7 @@
'username' => 'Laravel Log',
'emoji' => ':boom:',
'level' => env(key: 'LOG_LEVEL', default: 'critical'),
'replace_placeholders' => true,
],

'papertrail' => [
Expand All @@ -87,6 +91,7 @@
'port' => env(key: 'PAPERTRAIL_PORT'),
'connectionString' => 'tls://'.env(key: 'PAPERTRAIL_URL').':'.env(key: 'PAPERTRAIL_PORT'),
],
'processors' => [PsrLogMessageProcessor::class],
],

'stderr' => [
Expand All @@ -97,16 +102,20 @@
'with' => [
'stream' => 'php://stderr',
],
'processors' => [PsrLogMessageProcessor::class],
],

'syslog' => [
'driver' => 'syslog',
'level' => env(key: 'LOG_LEVEL', default: 'debug'),
'facility' => LOG_USER,
'replace_placeholders' => true,
],

'errorlog' => [
'driver' => 'errorlog',
'level' => env(key: 'LOG_LEVEL', default: 'debug'),
'replace_placeholders' => true,
],

'null' => [
Expand Down
8 changes: 7 additions & 1 deletion App/Infrastructure/Laravel/Config/mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
| sending an e-mail. You will specify which one you are using for your
| mailers below. You are free to add additional mailers as required.
|
| Supported: "smtp", "sendmail", "mailgun", "ses",
| Supported: "smtp", "sendmail", "mailgun", "ses", "ses-v2",
| "postmark", "log", "array", "failover"
|
*/
Expand All @@ -51,10 +51,16 @@

'mailgun' => [
'transport' => 'mailgun',
// 'client' => [
// 'timeout' => 5,
// ],
],

'postmark' => [
'transport' => 'postmark',
// 'client' => [
// 'timeout' => 5,
// ],
],

'sendmail' => [
Expand Down
16 changes: 16 additions & 0 deletions App/Infrastructure/Laravel/Config/queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,22 @@

],

/*
|--------------------------------------------------------------------------
| Job Batching
|--------------------------------------------------------------------------
|
| The following options configure the database and table that store job
| batching information. These options can be updated to any database
| connection and table which has been defined by your application.
|
*/
'batching' => [
'database' => env(key: 'DB_CONNECTION', default: 'mysql'),
'table' => 'job_batches',
],


/*
|--------------------------------------------------------------------------
| Failed Queue Jobs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
public function up(): void
{
Schema::create(table: 'password_resets', callback: function (Blueprint $table) {
Schema::create(table: 'password_reset_tokens', callback: function (Blueprint $table) {
$table->string(column: 'email', length: 200)->index();
$table->string(column: 'token');
$table->timestamp(column: 'created_at')->nullable();
Expand All @@ -25,6 +25,6 @@ public function up(): void
*/
public function down(): void
{
Schema::dropIfExists(table: 'password_resets');
Schema::dropIfExists(table: 'password_reset_tokens');
}
};
8 changes: 4 additions & 4 deletions App/Infrastructure/Laravel/Http/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,18 @@ class Kernel extends HttpKernel
],

'api' => [
'throttle:api',
ThrottleRequests::class.':api',
],
];

/**
* The application's route middleware.
* The application's middleware aliases.
*
* These middleware may be assigned to groups or used individually.
* Aliases may be used instead of class names to conveniently assign middleware to routes and groups.
*
* @var array<string, class-string|string>
*/
protected $routeMiddleware = [
protected $middlewareAliases = [
'auth' => Authenticate::class,
'cache.headers' => SetCacheHeaders::class,
'can' => Authorize::class,
Expand Down
4 changes: 1 addition & 3 deletions App/Infrastructure/Laravel/Http/Middleware/Authenticate.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ class Authenticate extends Middleware
{
/**
* Get the path the user should be redirected to when they are not authenticated.
*
* @param Request $request
*/
protected function redirectTo($request): ?string
protected function redirectTo(Request $request): ?string
{
return null;
}
Expand Down

0 comments on commit 52e4884

Please sign in to comment.