- deleting unnecesary php files
- updating fontawesome fonts - recover old version of solr.xslt
This commit is contained in:
parent
cdced81278
commit
412d62d9aa
31 changed files with 763 additions and 479 deletions
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App;
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
<?php
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Shelf extends Model
|
||||
{
|
||||
|
||||
protected $fillable = [
|
||||
'shelf'
|
||||
];
|
||||
|
||||
// public function books()
|
||||
// {
|
||||
// return $this->hasMany('App\Book');
|
||||
// }
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
<?php
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Transaction extends Model
|
||||
{
|
||||
|
||||
protected $fillable = [
|
||||
'student_id',
|
||||
'book_id',
|
||||
'borrowed_at',
|
||||
'returned_at',
|
||||
'fines',
|
||||
'status'
|
||||
];
|
||||
|
||||
public function student()
|
||||
{
|
||||
return $this->belongsTo('App\Person', 'student_id');
|
||||
}
|
||||
|
||||
public function book()
|
||||
{
|
||||
//model, foreign key in tsis model, primary key of relation
|
||||
return $this->belongsTo('App\Book', 'book_id', 'id');
|
||||
}
|
||||
|
||||
public function scopeNotReturnedYet($query)
|
||||
{
|
||||
return $query->where('status', 0);
|
||||
}
|
||||
|
||||
public function scopeReturned($query)
|
||||
{
|
||||
return $query->where('status', 1);
|
||||
}
|
||||
}
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue