Last active
October 26, 2017 13:55
-
-
Save Konafets/2e679a667dcf842b7f2a83dbc25f8ee1 to your computer and use it in GitHub Desktop.
Form Request Validation with rules from Model
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace App\Http\Requests; | |
use App\Models\BlogPost; | |
use Illuminate\Foundation\Http\FormRequest; | |
class PostStoreRequest extends FormRequest | |
{ | |
public function rules() | |
{ | |
return BlogPost::$createRules | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment