Initial Commit
The initial public commit of MVGL website code.
This commit is contained in:
commit
b39ecf1638
2043 changed files with 215154 additions and 0 deletions
23
app/Models/ConsoleList.php
Normal file
23
app/Models/ConsoleList.php
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class ConsoleList extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'consoles'
|
||||
];
|
||||
}
|
52
app/Models/Game.php
Normal file
52
app/Models/Game.php
Normal file
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Game extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'alt_titles',
|
||||
'platform_id',
|
||||
'description',
|
||||
'source',
|
||||
'boxart',
|
||||
'genre_ids',
|
||||
'developers',
|
||||
'publishers',
|
||||
'composers',
|
||||
'website',
|
||||
'na_release_date',
|
||||
'eu_release_date',
|
||||
'jp_release_date',
|
||||
'aus_release_date',
|
||||
'esrb_rating',
|
||||
'pegi_rating',
|
||||
'cero_rating',
|
||||
'acb_rating',
|
||||
'requested_by',
|
||||
'added_by'
|
||||
];
|
||||
|
||||
/**
|
||||
* Game relation to platform model
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
*/
|
||||
public function platform()
|
||||
{
|
||||
return $this->hasOne(Platform::class, 'id', 'platform_id');
|
||||
}
|
||||
}
|
25
app/Models/GameComment.php
Normal file
25
app/Models/GameComment.php
Normal file
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class GameComment extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'game_id',
|
||||
'user_id',
|
||||
'comment',
|
||||
'ip_address'
|
||||
];
|
||||
}
|
57
app/Models/GameList.php
Normal file
57
app/Models/GameList.php
Normal file
|
@ -0,0 +1,57 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class GameList extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'game_id',
|
||||
'name',
|
||||
'platform_id',
|
||||
'ownership',
|
||||
'status',
|
||||
'rating',
|
||||
'priority',
|
||||
'difficulty',
|
||||
'hours_played',
|
||||
'replay_value',
|
||||
'start_date',
|
||||
'finish_date',
|
||||
'is_replaying',
|
||||
'notes',
|
||||
'ip_address'
|
||||
];
|
||||
|
||||
/**
|
||||
* Game list relation to user model
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
*/
|
||||
public function user()
|
||||
{
|
||||
return $this->hasOne(User::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Game list relation to game model
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
*/
|
||||
public function game()
|
||||
{
|
||||
return $this->hasOne(Game::class, 'id', 'game_id');
|
||||
}
|
||||
}
|
23
app/Models/Genre.php
Normal file
23
app/Models/Genre.php
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Genre extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'ip_address'
|
||||
];
|
||||
}
|
22
app/Models/Platform.php
Normal file
22
app/Models/Platform.php
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Platform extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name'
|
||||
];
|
||||
}
|
25
app/Models/ProfileComment.php
Normal file
25
app/Models/ProfileComment.php
Normal file
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class ProfileComment extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'sender_id',
|
||||
'receiver_id',
|
||||
'comment',
|
||||
'ip_address'
|
||||
];
|
||||
}
|
11
app/Models/Role.php
Normal file
11
app/Models/Role.php
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Role extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
}
|
131
app/Models/User.php
Normal file
131
app/Models/User.php
Normal file
|
@ -0,0 +1,131 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Core\Traits\SpatieLogsActivity;
|
||||
use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
|
||||
class User extends Authenticatable implements MustVerifyEmail
|
||||
{
|
||||
use HasFactory;
|
||||
use Notifiable;
|
||||
use SpatieLogsActivity;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'username',
|
||||
'password',
|
||||
'email',
|
||||
'role_id',
|
||||
'avatar',
|
||||
'coverpic',
|
||||
'bio',
|
||||
'status',
|
||||
'api_token',
|
||||
'stripe_id',
|
||||
'profile_views',
|
||||
'list_views',
|
||||
'blog_views',
|
||||
'banned',
|
||||
'user_deleted',
|
||||
'ip_address'
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be hidden for arrays.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $hidden = [
|
||||
'password',
|
||||
'api_token',
|
||||
'stripe_id',
|
||||
'remember_token'
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast to native types.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $casts = [
|
||||
'email_verified_at' => 'datetime',
|
||||
];
|
||||
|
||||
public function getRememberToken()
|
||||
{
|
||||
return $this->remember_token;
|
||||
}
|
||||
|
||||
public function setRememberToken($value)
|
||||
{
|
||||
$this->remember_token = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* User relation to user gamertags model
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
*/
|
||||
public function gamertags()
|
||||
{
|
||||
return $this->hasOne(UserGamerTag::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* User relation to user info model
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
*/
|
||||
public function info()
|
||||
{
|
||||
return $this->hasOne(UserInfo::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* User relation to user notification settings model
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
*/
|
||||
public function notifications()
|
||||
{
|
||||
return $this->hasOne(UserNotificationSetting::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* User relation to role model
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
*/
|
||||
public function role()
|
||||
{
|
||||
return $this->hasOne(Role::class, 'id', 'role_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* User relation to game list model
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function gameList()
|
||||
{
|
||||
return $this->hasMany(GameList::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* User relation to user site settings model
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function siteSettings()
|
||||
{
|
||||
return $this->hasMany(UserSiteSetting::class);
|
||||
}
|
||||
}
|
40
app/Models/UserGamerTag.php
Normal file
40
app/Models/UserGamerTag.php
Normal file
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class UserGamerTag extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'xbox_live',
|
||||
'wii',
|
||||
'wii_u',
|
||||
'3ds',
|
||||
'nintendo_id',
|
||||
'nintendo_switch_id',
|
||||
'psn',
|
||||
'steam',
|
||||
'battle_net'
|
||||
];
|
||||
|
||||
/**
|
||||
* User Gamer Tag relation to user model
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
}
|
40
app/Models/UserInfo.php
Normal file
40
app/Models/UserInfo.php
Normal file
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class UserInfo extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'website',
|
||||
'facebook',
|
||||
'twitter',
|
||||
'instagram',
|
||||
'myanimelist',
|
||||
'location',
|
||||
'true_achievements',
|
||||
'true_trophies',
|
||||
'twitch'
|
||||
];
|
||||
|
||||
/**
|
||||
* User Info relation to user model
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
}
|
37
app/Models/UserNotificationSetting.php
Normal file
37
app/Models/UserNotificationSetting.php
Normal file
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class UserNotificationSetting extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'comment_on_your_profile',
|
||||
'previously_left_comment_on_game',
|
||||
'comment_for_game_on_list',
|
||||
'comment_on_your_review',
|
||||
'previously_left_comment_on_review',
|
||||
'friend_added_you'
|
||||
];
|
||||
|
||||
/**
|
||||
* User notification setting relation to user model
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
}
|
34
app/Models/UserSiteSetting.php
Normal file
34
app/Models/UserSiteSetting.php
Normal file
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class UserSiteSetting extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'setting_name',
|
||||
'setting_value',
|
||||
];
|
||||
|
||||
/**
|
||||
* User Site Settings relation to user model
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
*/
|
||||
public function user()
|
||||
{
|
||||
return $this->hasOne(User::class);
|
||||
}
|
||||
}
|
25
app/Models/Wishlist.php
Normal file
25
app/Models/Wishlist.php
Normal file
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Wishlist extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'game_id',
|
||||
'sort_order',
|
||||
'ip_address'
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue