Skip to content
This repository was archived by the owner on Jul 30, 2024. It is now read-only.

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
milenmk committed Feb 14, 2023
1 parent ca29b77 commit b88f12d
Show file tree
Hide file tree
Showing 64 changed files with 177 additions and 2 deletions.
2 changes: 2 additions & 0 deletions app/Console/Kernel.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

namespace App\Console;

use Illuminate\Console\Scheduling\Schedule;
Expand Down
2 changes: 2 additions & 0 deletions app/Exceptions/Handler.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

namespace App\Exceptions;

use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
Expand Down
4 changes: 3 additions & 1 deletion app/Http/Controllers/Auth/PasswordResetLinkController.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ public function create(): View
/**
* Handle an incoming password reset link request.
*
* @throws ValidationException
* @param Request $request
*
* @return RedirectResponse
*/
public function store(Request $request): RedirectResponse
{
Expand Down
2 changes: 2 additions & 0 deletions app/Http/Controllers/Controller.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

namespace App\Http\Controllers;

use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
Expand Down
2 changes: 2 additions & 0 deletions app/Http/Kernel.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

namespace App\Http;

use App\Http\Middleware\Authenticate;
Expand Down
2 changes: 2 additions & 0 deletions app/Http/Middleware/Authenticate.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

namespace App\Http\Middleware;

use Illuminate\Auth\Middleware\Authenticate as Middleware;
Expand Down
2 changes: 2 additions & 0 deletions app/Http/Middleware/EncryptCookies.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

namespace App\Http\Middleware;

use Illuminate\Cookie\Middleware\EncryptCookies as Middleware;
Expand Down
3 changes: 3 additions & 0 deletions app/Http/Middleware/Localization.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
<?php

declare(strict_types = 1);

namespace App\Http\Middleware;

use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Session;

class Localization
{
/**
Expand Down
2 changes: 2 additions & 0 deletions app/Http/Middleware/PreventRequestsDuringMaintenance.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

namespace App\Http\Middleware;

use Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance as Middleware;
Expand Down
2 changes: 2 additions & 0 deletions app/Http/Middleware/RedirectIfAuthenticated.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

namespace App\Http\Middleware;

use App\Providers\RouteServiceProvider;
Expand Down
2 changes: 2 additions & 0 deletions app/Http/Middleware/TrimStrings.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

namespace App\Http\Middleware;

use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware;
Expand Down
2 changes: 2 additions & 0 deletions app/Http/Middleware/TrustHosts.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

namespace App\Http\Middleware;

use Illuminate\Http\Middleware\TrustHosts as Middleware;
Expand Down
2 changes: 2 additions & 0 deletions app/Http/Middleware/TrustProxies.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

namespace App\Http\Middleware;

use Illuminate\Http\Middleware\TrustProxies as Middleware;
Expand Down
2 changes: 2 additions & 0 deletions app/Http/Middleware/ValidateSignature.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

namespace App\Http\Middleware;

use Illuminate\Routing\Middleware\ValidateSignature as Middleware;
Expand Down
2 changes: 2 additions & 0 deletions app/Http/Middleware/VerifyCsrfToken.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

namespace App\Http\Middleware;

use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
Expand Down
2 changes: 2 additions & 0 deletions app/Http/Requests/Auth/LoginRequest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

namespace App\Http\Requests\Auth;

use Illuminate\Auth\Events\Lockout;
Expand Down
2 changes: 2 additions & 0 deletions app/Http/Requests/ProfileUpdateRequest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

namespace App\Http\Requests;

use App\Models\User;
Expand Down
17 changes: 17 additions & 0 deletions app/Models/Domain.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
<?php

declare(strict_types = 1);

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;

class Domain extends Model
{
Expand All @@ -18,11 +22,24 @@ class Domain extends Model
];

//Relationship to user

/**
* @return BelongsTo
*/
/**
* @return BelongsTo
*/
public function user()
{
return $this->belongsTo(User::class, 'user_id');
}

/**
* @return HasMany
*/
/**
* @return HasMany
*/
public function records()
{
return $this->hasMany(Record::class, 'domain_id');
Expand Down
21 changes: 21 additions & 0 deletions app/Models/Record.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<?php

declare(strict_types = 1);

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class Record extends Model
{
Expand All @@ -18,11 +21,29 @@ class Record extends Model
'user_id',
];

/**
* @return BelongsTo
*/
/**
* @return BelongsTo
*/
public function domain()
{
return $this->belongsTo(Domain::class, 'domain_id');
}

/**
* @param $query
* @param array $filters
*
* @return void
*/
/**
* @param $query
* @param array $filters
*
* @return void
*/
public function scopeFilter($query, array $filters)
{
if ($filters['domain_id'] ?? false) {
Expand Down
9 changes: 9 additions & 0 deletions app/Models/User.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<?php

declare(strict_types = 1);

namespace App\Models;

// use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum\HasApiTokens;
Expand Down Expand Up @@ -48,6 +51,12 @@ class User extends Authenticatable
'email_verified_at' => 'datetime',
];

/**
* @return HasMany
*/
/**
* @return HasMany
*/
public function domains()
{
return $this->hasMany(Domain::class, 'user_id');
Expand Down
2 changes: 2 additions & 0 deletions app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

namespace App\Providers;

use Exception;
Expand Down
2 changes: 2 additions & 0 deletions app/Providers/AuthServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

namespace App\Providers;

// use Illuminate\Support\Facades\Gate;
Expand Down
2 changes: 2 additions & 0 deletions app/Providers/BroadcastServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

namespace App\Providers;

use Illuminate\Support\Facades\Broadcast;
Expand Down
2 changes: 2 additions & 0 deletions app/Providers/EventServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

namespace App\Providers;

use Illuminate\Auth\Events\Registered;
Expand Down
2 changes: 2 additions & 0 deletions app/Providers/RouteServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

namespace App\Providers;

use Illuminate\Cache\RateLimiting\Limit;
Expand Down
2 changes: 2 additions & 0 deletions app/View/Components/AppLayout.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

namespace App\View\Components;

use Illuminate\View\Component;
Expand Down
2 changes: 2 additions & 0 deletions app/View/Components/GuestLayout.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

namespace App\View\Components;

use Illuminate\View\Component;
Expand Down
1 change: 1 addition & 0 deletions artisan
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env php
<?php
declare(strict_types = 1);

define('LARAVEL_START', microtime(true));

Expand Down
2 changes: 2 additions & 0 deletions bootstrap/app.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

/*
|--------------------------------------------------------------------------
| Create The Application
Expand Down
2 changes: 2 additions & 0 deletions config/app.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

use Illuminate\Support\Facades\Facade;

return [
Expand Down
2 changes: 2 additions & 0 deletions config/auth.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

return [

/*
Expand Down
2 changes: 2 additions & 0 deletions config/broadcasting.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

return [

/*
Expand Down
2 changes: 2 additions & 0 deletions config/cache.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

use Illuminate\Support\Str;

return [
Expand Down
2 changes: 2 additions & 0 deletions config/cors.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

return [

/*
Expand Down
2 changes: 2 additions & 0 deletions config/database.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

use Illuminate\Support\Str;

return [
Expand Down
2 changes: 2 additions & 0 deletions config/filesystems.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

return [

/*
Expand Down
2 changes: 2 additions & 0 deletions config/hashing.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

return [

/*
Expand Down
2 changes: 2 additions & 0 deletions config/installer.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

return [

/*
Expand Down
Loading

0 comments on commit b88f12d

Please sign in to comment.