Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Laravel 11.x Shift #12

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@ APP_KEY=
APP_DEBUG=true
APP_URL=http://dotenv.test

APP_TIMEZONE=UTC
APP_LOCALE=en
APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=en_US
APP_MAINTENANCE_DRIVER=file
APP_MAINTENANCE_STORE=database
BCRYPT_ROUNDS=12

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

Expand All @@ -15,12 +24,15 @@ DB_DATABASE=envmanager
DB_USERNAME=root
DB_PASSWORD=

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

MEMCACHED_HOST=127.0.0.1

Expand Down
28 changes: 0 additions & 28 deletions app/Console/Kernel.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 @@ -7,7 +7,7 @@
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;

class Controller extends BaseController
abstract class Controller extends BaseController
{
use AuthorizesRequests;
use DispatchesJobs;
Expand Down
49 changes: 0 additions & 49 deletions app/Http/Kernel.php

This file was deleted.

21 changes: 0 additions & 21 deletions app/Http/Middleware/Authenticate.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.

24 changes: 0 additions & 24 deletions app/Http/Middleware/RedirectIfAuthenticated.php

This file was deleted.

3 changes: 2 additions & 1 deletion app/Http/Middleware/StoreMarketingQueryParamsMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
namespace App\Http\Middleware;

use Closure;
use Illuminate\Http\Request;

class StoreMarketingQueryParamsMiddleware
{
public function handle($request, Closure $next): mixed
public function handle(Request $request, Closure $next): mixed
{
$utmQueryParams = [
'utm_source',
Expand Down
19 changes: 0 additions & 19 deletions app/Http/Middleware/TrimStrings.php

This file was deleted.

20 changes: 0 additions & 20 deletions app/Http/Middleware/TrustHosts.php

This file was deleted.

28 changes: 0 additions & 28 deletions app/Http/Middleware/TrustProxies.php

This file was deleted.

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

This file was deleted.

11 changes: 7 additions & 4 deletions app/Models/Environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@ class Environment extends MediaModel
use HasSlug;
use InteractsWithMedia;

protected $casts = [
'id' => 'integer',
];

protected $guarded = ['id'];

protected function casts(): array
{
return [
'id' => 'integer',
];
}

public function routeKey(): Attribute
{
return new Attribute(
Expand Down
11 changes: 7 additions & 4 deletions app/Models/Project.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,19 @@ class Project extends MediaModel
use HasSlug;
use InteractsWithMedia;

protected $casts = [
'id' => 'integer',
];

protected $with = [
'targets',
];

protected $guarded = ['id'];

protected function casts(): array
{
return [
'id' => 'integer',
];
}

protected static function booted(): void
{
static::addGlobalScope('currentTeam', function (Builder $builder) {
Expand Down
11 changes: 7 additions & 4 deletions app/Models/Target.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,19 @@ class Target extends MediaModel
use HasSlug;
use InteractsWithMedia;

protected $casts = [
'id' => 'integer',
];

protected $with = [
'environments',
];

protected $guarded = ['id'];

protected function casts(): array
{
return [
'id' => 'integer',
];
}

public function routeKey(): Attribute
{
return new Attribute(
Expand Down
11 changes: 7 additions & 4 deletions app/Models/Team.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ class Team extends JetstreamTeam
{
use HasFactory;

protected $casts = [
'personal_team' => 'boolean',
];

protected $guarded = [];

protected $dispatchesEvents = [
Expand All @@ -24,6 +20,13 @@ class Team extends JetstreamTeam
'deleted' => TeamDeleted::class,
];

protected function casts(): array
{
return [
'personal_team' => 'boolean',
];
}

public function projects(): \Illuminate\Database\Eloquent\Relations\HasMany
{
return $this->hasMany(Project::class);
Expand Down
Loading