initial commit
This commit is contained in:
commit
d96b74e6c1
88 changed files with 15238 additions and 0 deletions
10
app/Models/Invitation.php
Normal file
10
app/Models/Invitation.php
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Invitation extends Model
|
||||
{
|
||||
//
|
||||
}
|
||||
25
app/Models/Movie.php
Normal file
25
app/Models/Movie.php
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* @method static self create(array $attributes)
|
||||
*/
|
||||
class Movie extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'title',
|
||||
'imdb_id',
|
||||
'year',
|
||||
'director',
|
||||
'actors',
|
||||
'plot',
|
||||
'genre',
|
||||
'mpaa_rating',
|
||||
'critic_scores',
|
||||
'poster',
|
||||
'added_by',
|
||||
];
|
||||
}
|
||||
21
app/Models/MovieList.php
Normal file
21
app/Models/MovieList.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
|
||||
class MovieList extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'is_public',
|
||||
'owner',
|
||||
'slug',
|
||||
];
|
||||
|
||||
public function movies(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(Movie::class);
|
||||
}
|
||||
}
|
||||
10
app/Models/Profile.php
Normal file
10
app/Models/Profile.php
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Profile extends Model
|
||||
{
|
||||
//
|
||||
}
|
||||
53
app/Models/User.php
Normal file
53
app/Models/User.php
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
// use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
|
||||
class User extends Authenticatable
|
||||
{
|
||||
/** @use HasFactory<\Database\Factories\UserFactory> */
|
||||
use HasFactory, Notifiable;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var list<string>
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'email',
|
||||
'password',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be hidden for serialization.
|
||||
*
|
||||
* @var list<string>
|
||||
*/
|
||||
protected $hidden = [
|
||||
'password',
|
||||
'remember_token',
|
||||
];
|
||||
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'email_verified_at' => 'datetime',
|
||||
'password' => 'hashed',
|
||||
];
|
||||
}
|
||||
|
||||
public function profile(): HasOne {
|
||||
return $this->hasOne(Profile::class);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue