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 | |
| trait Presentable | |
| { | |
| /** | |
| * @var mixed | |
| */ | |
| protected $presenterInstance; | |
| /** |
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 | |
| // Context: | |
| // we have a list of "content owners" (simply an account that can manage content on a third party website) in our database | |
| // a cronjob will sync them. it will add new ones and notify about unavlaibale ones. we can not simply remove unablibale ones | |
| // from the database. | |
| // to get all unavliabel content owners we all avalibale content owners from the api and all content owners from our database. | |
| // and then we execute the nastiest foreach chain on earth to filter out the ones in our db that are not present in the api as | |
| // avalibale. |
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
| if (!function_exists('set_active')) { | |
| /** | |
| * Set active class if request is in path. | |
| * | |
| * @param string $path | |
| * @param array $classes | |
| * @param string $active | |
| * | |
| * @return string | |
| */ |
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
| /** | |
| * larail.js | |
| * | |
| * Perform a DELETE or PUT request outside a form with a simple link | |
| * and some data-type attributes. For use with Laravel PHP framework. | |
| * | |
| * Step 1: For CSRF-Support you have to put in your <head> section: | |
| * <meta name="csrf-token" content="{{ csrf_token() }}"> | |
| * | |
| * Step 2: Simply build a link like this: |