Near the top of the file add a meta tag to make the csrf-token available for the JavaScript ajax function. js modules in the resources/assets folder and using elixer to deploy them to a public folder is a topic for another tutorial.Įdit the base layout template resources/views/layouts/. Has ('name') ? ' has-error' : '' }}" > Name Registerįor this tutorial, just going to inline the JavaScript to handle the Ajax at the bottom of the base layout view. Since these rules apply to the User, and that model is already being used by the AuthController, it seeems to be the best place for them.Įdit app/Models/User.php, adding the public function rules() to the class. The validation rules are currently located in the AuthController, I would like to be able to share them with the new controller we will create later for ajax validation. Default Values are available in Updated Xampp version 5.6.12 and above for. Now run php artisan migrate to create the tables for users.
0 Comments
Leave a Reply. |