This file contains 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 | |
/* | |
|-------------------------------------------------------------------------- | |
| Laravel 5 - URL Query String Helper | |
|-------------------------------------------------------------------------- | |
| | |
| A helper function to take a URL string then quickly and easily add query | |
| string parameters to it, or change existing ones. | |
| | |
| url_queries(['order' => 'desc', 'page' => 2], |
This file contains 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 | |
/* | |
|-------------------------------------------------------------------------- | |
| Laravel 5, Bootstrap 4 Pagination | |
|-------------------------------------------------------------------------- | |
| | |
| A partial view to handle pagination for collections in Laravel's query | |
| builder or Eloquent ORM, styled with Bootstrap 4. | |
| | |
| The pagination displays like the following, where * denotes the current |
This file contains 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
/* | |
|-------------------------------------------------------------------------- | |
| At least one column must have a value | |
|-------------------------------------------------------------------------- | |
| | |
| This is a simple pair of triggers for MySQL databases that will disallow | |
| a row to be inserted into a table unless at least one of two predefined | |
| columns has a value set. | |
| | |
*/ |
This file contains 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 | |
/* | |
|-------------------------------------------------------------------------- | |
| Routing an unknown number of sub-levels | |
|-------------------------------------------------------------------------- | |
| | |
| This is how you can route an unknown number of sub-levels and pass them | |
| to the same controller. For example, the following URLs will go through | |
| the same route: | |
| |
NewerOlder