26 lines
441 B
PHP
26 lines
441 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Models;
|
||
|
|
||
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||
|
|
||
|
class Book extends Authenticatable {
|
||
|
|
||
|
/**
|
||
|
* The attributes that are mass assignable.
|
||
|
*
|
||
|
* @var array
|
||
|
*/
|
||
|
protected $fillable = [
|
||
|
'name',
|
||
|
];
|
||
|
|
||
|
public function author() {
|
||
|
return $this->hasMany(Author::class);
|
||
|
}
|
||
|
|
||
|
public function location() {
|
||
|
return $this->belongsTo(Location::class);
|
||
|
}
|
||
|
}
|