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 | |
| /** | |
| This Scheduler will run once every minute unlike the Heroku scheduler which only runs every 10 mintues. | |
| To use this scheduler with Laravel 5.4+ add this file to /app/Console/Commands/RunScheduler.php | |
| Register this file in app/Console/Kernel.php |
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 | |
| /********************************************************************************************* | |
| * Example usage (In view) | |
| * <div class="welcome"> | |
| <?php echo Form::open(array('route'=>'process','class'=>'form-horizontal'))?> | |
| <?php echo Form::textField('first_name')?> | |
| <?php echo Form::textField('last_name')?> | |
| <?php echo Form::emailField('email')?> | |
| <?php echo Form::passwordField('password')?> | |
| <?php echo Form::selectField('select_one', array('1'=>'abc', '2'=>'def'))?> |
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
| /* | |
| <a href="posts/2" data-method="delete"> <---- We want to send an HTTP DELETE request | |
| - Or, request confirmation in the process - | |
| <a href="posts/2" data-method="delete" data-confirm="Are you sure?"> | |
| */ | |
| (function() { |
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
| Route::get('edit', function() { | |
| // fetch our post, and it's associated categories | |
| $post = Post::with('cats')->where('id', '=', $id)->first(); | |
| // fetch all of our categories | |
| $cats = Cat::all(); | |
| // create our empty array | |
| $post_cats = array(); |