Skip to content

Commit

Permalink
migrate
Browse files Browse the repository at this point in the history
  • Loading branch information
asbiin committed Mar 27, 2024
1 parent bcb68e3 commit f273f85
Show file tree
Hide file tree
Showing 36 changed files with 228 additions and 918 deletions.
5 changes: 4 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,8 @@ indent_size = 2
[*.md]
trim_trailing_whitespace = false

[*.yml]
[*.{yml,yaml}]
indent_size = 2

[docker-compose.yml]
indent_size = 4
27 changes: 15 additions & 12 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost

BCRYPT_ROUNDS=12

LOG_CHANNEL=stack
LOG_STACK=single
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

Expand All @@ -17,22 +20,22 @@ DB_DATABASE=touslesprenoms
DB_USERNAME=root
DB_PASSWORD=

BROADCAST_DRIVER=log
CACHE_DRIVER=file
FILESYSTEM_DISK=local
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_DRIVER=database
SESSION_LIFETIME=120
SESSION_ENCRYPT=false
SESSION_PATH=/
SESSION_DOMAIN=null

MEMCACHED_HOST=127.0.0.1
BROADCAST_CONNECTION=log
FILESYSTEM_DISK=local
QUEUE_CONNECTION=sync

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
CACHE_STORE=file
CACHE_PREFIX=

MAIL_MAILER=smtp
MAIL_HOST=mailpit
MAIL_PORT=1025
MAIL_MAILER=log
MAIL_HOST=127.0.0.1
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
Expand Down
2 changes: 2 additions & 0 deletions app/Console/Commands/SetupApplication.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,12 @@ protected function clearConfig(): void
$this->artisan('✓ Clear config cache', 'config:clear');
$this->artisan('✓ Resetting route cache', 'route:cache');
$this->artisan('✓ Resetting view cache', 'view:clear');
$this->artisan('✓ Resetting event cache', 'event:cache');
} else {
$this->artisan('✓ Clear config cache', 'config:clear');
$this->artisan('✓ Clear route cache', 'route:clear');
$this->artisan('✓ Clear view cache', 'view:clear');
$this->artisan('✓ Clear event cache', 'event:clear');
}
}

Expand Down
28 changes: 0 additions & 28 deletions app/Console/Kernel.php

This file was deleted.

30 changes: 0 additions & 30 deletions app/Exceptions/Handler.php

This file was deleted.

2 changes: 1 addition & 1 deletion app/Http/Controllers/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;

class Controller extends BaseController
abstract class Controller extends BaseController
{
use AuthorizesRequests, ValidatesRequests;
}
71 changes: 0 additions & 71 deletions app/Http/Kernel.php

This file was deleted.

17 changes: 0 additions & 17 deletions app/Http/Middleware/EncryptCookies.php

This file was deleted.

17 changes: 0 additions & 17 deletions app/Http/Middleware/PreventRequestsDuringMaintenance.php

This file was deleted.

19 changes: 0 additions & 19 deletions app/Http/Middleware/TrimStrings.php

This file was deleted.

22 changes: 0 additions & 22 deletions app/Http/Middleware/ValidateSignature.php

This file was deleted.

17 changes: 0 additions & 17 deletions app/Http/Middleware/VerifyCsrfToken.php

This file was deleted.

21 changes: 21 additions & 0 deletions app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@

namespace App\Providers;

use Illuminate\Cache\RateLimiting\Limit;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\RateLimiter;
use Illuminate\Support\Facades\URL;
use Illuminate\Support\Number;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Str;

class AppServiceProvider extends ServiceProvider
{
Expand All @@ -22,5 +28,20 @@ public function register(): void
public function boot(): void
{
Number::useLocale(App::currentLocale());

if (Config::get('app.force_url')) {
URL::forceRootUrl(Str::of(config('app.url'))->ltrim('/'));
URL::forceScheme('https');
}

RateLimiter::for('api', function (Request $request) {
return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());
});

RateLimiter::for('search', function (Request $request) {
return $request->user()
? Limit::perMinute(100)->by($request->user()->id)
: Limit::perMinute(10)->by($request->ip());
});
}
}
26 changes: 0 additions & 26 deletions app/Providers/AuthServiceProvider.php

This file was deleted.

19 changes: 0 additions & 19 deletions app/Providers/BroadcastServiceProvider.php

This file was deleted.

Loading

0 comments on commit f273f85

Please sign in to comment.