Added Production build.

This commit is contained in:
2021-02-24 10:01:35 +01:00
commit 1e27c950c5
140 changed files with 14022 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class File extends Model
{
use HasFactory;
protected $fillable = [
"link"
];
public function post(){
return $this->belongsTo(Post::class);
}
}
+20
View File
@@ -0,0 +1,20 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Occupation extends Model
{
use HasFactory;
protected $fillable = [
"name"
];
public function post(){
return $this->hasMany(Post::class);
}
}
+34
View File
@@ -0,0 +1,34 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Post extends Model
{
use HasFactory;
protected $fillable = [
"title",
"text",
"post_time",
"time"
];
public function timePeriod(){
return $this->belongsTo(TimePeriod::class);
}
public function occupation(){
return $this->belongsTo(Occupation::class);
}
public function status(){
return $this->belongsTo(Status::class);
}
public function user(){
return $this->belongsTo(User::class);
}
public function files(){
return $this->hasMany(File::class);
}
}
+19
View File
@@ -0,0 +1,19 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Role extends Model
{
use HasFactory;
protected $fillable = [
"name"
];
public function users(){
return $this->hasMany(User::class);
}
}
+19
View File
@@ -0,0 +1,19 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Status extends Model
{
use HasFactory;
protected $fillable = [
"name"
];
public function posts(){
return $this->hasMany(Post::class);
}
}
+19
View File
@@ -0,0 +1,19 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class TimePeriod extends Model
{
use HasFactory;
protected $fillable = [
"name"
];
public function post(){
return $this->hasMany(Post::class);
}
}
+52
View File
@@ -0,0 +1,52 @@
<?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 Illuminate\Support\Facades\Hash;
class User extends Authenticatable
{
use HasFactory, Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name',
'username',
'password',
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
'password',
'remember_token',
];
public function role(){
return $this->belongsTo(Role::class);
}
public function posts() {
return $this->hasMany(Post::class);
}
/*
* Mutators
*/
// public function setPasswordAttribute($password) {
// $this->attributes['password'] = Hash::make($password);
// }
}