41 lines
783 B
PHP
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
|
|
];
|
|
}
|
|
}
|