Example of Form requests in nasirkhan/laravel-starter

File Modules/Article/Http/Requests/Backend/CategoriesRequest.php (link to Github)
use Illuminate\Foundation\Http\FormRequest;

class CategoriesRequest extends FormRequest
{
    public function authorize()
    {
        return true;
    }

    public function rules()
    {
        return [
            'name' => 'required|max:191|unique:categories,name,'.$this->category,
            'slug' => 'nullable|max:191|unique:categories,slug,'.$this->category,
        ];
    }
}

Additional resources on Form requests: