initial commit

This commit is contained in:
Arno Kaimbacher 2015-07-19 13:49:24 +07:00
commit 28301e4312
219 changed files with 23035 additions and 0 deletions

42
app/Student.php Executable file
View file

@ -0,0 +1,42 @@
<?php namespace App;
use Illuminate\Database\Eloquent\Model;
class Student extends Model {
protected $fillable = [
'name',
'registered_at',
'borrow',
'status'
];
public function transactions()
{
return $this->hasMany('App\Transaction');
}
public function scopeNotLimit($query)
{
return $query->where('borrow', '<', 3);
}
public function scopeActive($query)
{
return $query->where('status', 1);
}
public function scopeOrderByName($query)
{
return $query->orderBy('name');
}
}