[WIP] Setup of skeleton

This commit is contained in:
Ludovic CANDELLIER
2020-03-25 00:08:27 +01:00
parent baf8e13c25
commit 36267139a1
377 changed files with 18248 additions and 26 deletions

View File

@@ -0,0 +1,32 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class ApplicationPage extends Model
{
protected $table = 'application_pages';
public $timestamps = false;
public function application()
{
return $this->belongsTo('App\Models\Modules\Application');
}
public function scopeActive($query)
{
return $query->where('active', 1);
}
public function scopeByApplication($query, $application_id)
{
return $query->where('application_id', $application_id);
}
public function scopeBySlug($query, $slug)
{
return $query->where('slug', $slug);
}
}