CreateRequest.php 595 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace App\Http\Requests\Admin;
  3. use Illuminate\Foundation\Http\FormRequest;
  4. use Illuminate\Support\Facades\Auth;
  5. class CreateRequest extends FormRequest
  6. {
  7. /**
  8. * Determine if the user is authorized to make this request.
  9. *
  10. * @return bool
  11. */
  12. public function authorize()
  13. {
  14. if( Auth::check() ){
  15. return true;
  16. }
  17. return false;
  18. }
  19. /**
  20. * Get the validation rules that apply to the request.
  21. *
  22. * @return array
  23. */
  24. public function rules()
  25. {
  26. return [
  27. //
  28. ];
  29. }
  30. }