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

View file

@ -0,0 +1,32 @@
<?php namespace App\Http\Requests;
use App\Http\Requests\Request;
class BookRequest extends Request {
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'title' => 'required|min:5',
'author' => 'required|min:4',
'stock' => 'required|integer',
'year' => 'required|integer|min:4'
];
}
}

View file

@ -0,0 +1,31 @@
<?php namespace App\Http\Requests;
use App\Http\Requests\Request;
class CategoryRequest extends Request {
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'category' => 'required|min:3'
];
}
}

View file

@ -0,0 +1,30 @@
<?php namespace App\Http\Requests;
use App\Http\Requests\Request;
class FinesRequest extends Request {
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'days' => 'required|integer',
'fines' => 'required|integer'
];
}
}

View file

@ -0,0 +1,29 @@
<?php namespace App\Http\Requests;
use App\Http\Requests\Request;
class PeminjamanRequest extends Request {
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
//
];
}
}

View file

@ -0,0 +1,29 @@
<?php namespace App\Http\Requests;
use App\Http\Requests\Request;
class PeriodeRequest extends Request {
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'days' => 'required|integer'
];
}
}

9
app/Http/Requests/Request.php Executable file
View file

@ -0,0 +1,9 @@
<?php namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
abstract class Request extends FormRequest {
//
}

View file

@ -0,0 +1,29 @@
<?php namespace App\Http\Requests;
use App\Http\Requests\Request;
class ShelfRequest extends Request {
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'shelf' => 'required'
];
}
}

View file

@ -0,0 +1,31 @@
<?php namespace App\Http\Requests;
use App\Http\Requests\Request;
class StudentRequest extends Request {
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'name' => 'required|min:5'
];
}
}