22 lines
356 B
PHP
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);
|
||
|
}
|
||
|
}
|