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
| import argparse | |
| from django.core.management.base import BaseCommand | |
| from django.db import connection | |
| class Command(BaseCommand): | |
| help = 'Renames app. Usage rename_app [old_name] [new_name] [classes ...]' | |
| def add_arguments(self, parser): |
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
| Here is a quick way to add authentication logging to Laravel. | |
| 1. Modify app/Providers/EventServiceProvider.php and add lines 16 through 32 of the example file in this GIST. | |
| 2. Create a new file app/Listeners/LogActivity.php and copy the contents of the file below into that file. | |
| 3. Enjoy logging. |
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
| NPM Error when listening on most ports - npm run dev error | |
| run cmd as administrator and run this command | |
| net stop winnat | |
| net start winnat |
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 can be found in the Symfony\Component\HttpFoundation\Response class | |
| const HTTP_CONTINUE = 100; | |
| const HTTP_SWITCHING_PROTOCOLS = 101; | |
| const HTTP_PROCESSING = 102; // RFC2518 | |
| const HTTP_OK = 200; | |
| const HTTP_CREATED = 201; | |
| const HTTP_ACCEPTED = 202; |
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
| DB::enableQueryLog(); | |
| -- Laravel Query here | |
| DB::getQueryLog(); |