bookinventory/app/Models/Author.php
Tyler d086b29bcc
All checks were successful
continuous-integration/drone/push Build is passing
A ton of progress, search start
2020-12-26 05:46:23 -05:00

22 lines
330 B
PHP

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