first commit

This commit is contained in:
Tyler
2020-12-21 02:09:34 -05:00
commit 2802973d3f
113 changed files with 30356 additions and 0 deletions

21
app/Models/Author.php Normal file
View File

@ -0,0 +1,21 @@
<?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);
}
}

25
app/Models/Book.php Normal file
View File

@ -0,0 +1,25 @@
<?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);
}
}

17
app/Models/Location.php Normal file
View File

@ -0,0 +1,17 @@
<?php
namespace App\Models;
use Illuminate\Foundation\Auth\User as Authenticatable;
class Location extends Authenticatable {
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name',
];
}