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

22 lines
356 B
PHP

<?php
namespace App\Models;
use Illuminate\Foundation\Auth\User as Authenticatable;
class Author extends Authenticatable {
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name',
];
public function books() {
return $this->belongsToMany(Book::class);
}
}