Cleaning (#1)

* Sanctum removed

* Unused middleware classes removed

* Changed default email - Seeder

* Models updated

* Config .env is now smaller

* Not used, so not used - Providers

* Clearing your router of comments
This commit is contained in:
2022-05-19 13:22:51 +02:00
committed by GitHub
parent 500523efd6
commit d118793e01
29 changed files with 187 additions and 534 deletions

View File

@@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
namespace App\Models;
use Illuminate\Database\Eloquent\Builder;
@@ -14,7 +16,6 @@ use Illuminate\Database\Eloquent\Model;
*/
class Category extends Model
{
// use HasFactory;
protected $guarded = [];
protected $casts = [
@@ -26,7 +27,7 @@ class Category extends Model
'visible' => 'boolean'
];
public function scopeVisibled(Builder $builder)
public function scopeVisibled(Builder $builder): Builder
{
return $builder->where(function (Builder $query) {
$query->where('visible', true)

View File

@@ -23,10 +23,7 @@ use Illuminate\Database\Eloquent\Builder;
class Project extends Model
{
// use HasFactory;
protected $dateFormat = 'Y-m-d';
protected $guarded = [];
protected $casts = [
'id' => 'integer',
@@ -65,7 +62,7 @@ class Project extends Model
$this->attributes['update_date'] = null;
}
public function scopeVisibled(Builder $builder)
public function scopeVisibled(Builder $builder): Builder
{
return $builder->where('visible', true);
}

View File

@@ -1,44 +1,31 @@
<?php
declare(strict_types=1);
namespace App\Models;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum\HasApiTokens;
class User extends Authenticatable
{
use HasApiTokens, HasFactory, Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
use HasFactory, Notifiable;
protected $fillable = [
'name',
'email',
'password',
];
/**
* The attributes that should be hidden for serialization.
*
* @var array<int, string>
*/
protected $hidden = [
'password',
'remember_token',
];
/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
'email_verified_at' => 'datetime',
];
}