Advertisement
heisenberg_

Book (Model)

Feb 24th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.25 KB | None | 0 0
  1. <?php
  2.  
  3. namespace App;
  4.  
  5. use Illuminate\Database\Eloquent\Model;
  6.  
  7. class Book extends Model
  8. {
  9.     protected $fillable =[
  10.         'title','genres','synopsis','author_id'];
  11.    
  12.     public function author()
  13.     {
  14.         return $this->belongsTo(Author::class);
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement