bookinventory/app/Models/Book.php
2020-12-21 02:09:34 -05:00

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);
}
}