First commit for project

This commit is contained in:
2022-02-13 11:19:29 +01:00
commit d9c8d55505
106 changed files with 47789 additions and 0 deletions

28
app/Models/Category.php Normal file
View File

@@ -0,0 +1,28 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
/**
* @property int $id
* @property string $name
* @property string $slug
* @property bool $default
* @property bool $visible
*/
class Category extends Model
{
// use HasFactory;
protected $guarded = [];
protected $casts = [
'id' => 'integer',
'name' => 'string',
'slug' => 'string',
'priority' => 'integer',
'default' => 'bool',
'visible' => 'bool'
];
}

38
app/Models/Project.php Normal file
View File

@@ -0,0 +1,38 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Carbon;
/**
* @property int $id
* @property string $title
* @property array $categories
* @property string $author
* @property string $image_url
* @property Carbon $release_data
* @property string $project_url
* @property string $project_version
* @property string $description
*/
class Project extends Model
{
// use HasFactory;
protected $guarded = [];
protected $casts = [
'id' => 'integer',
'title' => 'string',
'categories' => 'array',
'author' => 'string',
'image_url' => 'string',
'release_data' => 'datetime:d-m-Y',
'project_url' => 'string',
'project_version' => 'string',
'description' => 'string'
];
}

44
app/Models/User.php Normal file
View File

@@ -0,0 +1,44 @@
<?php
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>
*/
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',
];
}