laravel-learn-bbs/app/Http/Requests/TopicRequest.php
2018-01-01 12:00:45 +08:00

41 lines
783 B
PHP

<?php
namespace App\Http\Requests;
class TopicRequest extends Request
{
public function rules()
{
switch ($this->method()) {
// CREATE
case 'POST':
{
return [
// CREATE ROLES
];
}
// UPDATE
case 'PUT':
case 'PATCH':
{
return [
// UPDATE ROLES
];
}
case 'GET':
case 'DELETE':
default:
{
return [];
};
}
}
public function messages()
{
return [
// Validation messages
];
}
}