You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
456 B
27 lines
456 B
5 years ago
|
<?php
|
||
|
|
||
|
namespace App;
|
||
|
|
||
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
||
|
class SpPage extends Model{
|
||
|
|
||
|
protected $fillable = ['name_en', 'name_fa', 'sp_template_id'];
|
||
|
|
||
|
public function template()
|
||
|
{
|
||
|
return $this->belongsTo('App\SpTemplate');
|
||
|
}
|
||
|
|
||
|
public function frames()
|
||
|
{
|
||
|
return $this->hasMany('App\SpFrame', 'sp_page_id');
|
||
|
}
|
||
|
|
||
|
public function user_pages()
|
||
|
{
|
||
|
return $this->hasMany('App\SpUserPage');
|
||
|
}
|
||
|
|
||
|
}
|