PHP | Laravel | Web Scraping
A curated list of amazingly awesome PHP libraries, resources and shiny things.
PHP | Laravel | Web Scraping
A curated list of amazingly awesome PHP libraries, resources and shiny things.
by alexander white ©
| ## Making a 32 bit version of Homestead | |
| # Clone the settler repository to a directory | |
| git clone https://github.com/laravel/settler.git Ubuntu32 | |
| # In that directory edit the file called "Vagrantfile" to use a ubuntu 32 box instead of the 64 bit one | |
| change this line: | |
| config.vm.box = "ubuntu/trusty64" |
| <?php | |
| trait Gettable { | |
| /** | |
| * Retrieve private attributes. | |
| * Attributes should be protected | |
| * so they cannot be *set* arbitrarily. | |
| * This allows us to *get* them as if they | |
| * were public. |
| { | |
| "structure": { | |
| "copy": [ | |
| { | |
| "from": "/projects/hex-arch-laravel/app/lib/Contracts/Instances/InstanceInterface.php", | |
| "to": "app/lib/Contracts/Instances/InstanceInterface.php" | |
| }, | |
| { | |
| "from": "/projects/hex-arch-laravel/app/lib/Contracts/Notification/CreatorInterface.php", | |
| "to": "app/lib/Contracts/Notification/CreatorInterface.php" |
| Event::listen('404', function() | |
| { | |
| $username = URI::segment(1); | |
| $user = User::where_username($username) | |
| ->where_type('account') | |
| ->first(); | |
| if ($user != null) { | |
| if ($user->username != '') { |
| <!-- Prevent FOUC (flash of unstyled content) - http://johnpolacek.com/2012/10/03/help-prevent-fouc/ --> | |
| <style type="text/css"> | |
| .no-fouc {display: none;} | |
| </style> | |
| <script type="text/javascript"> | |
| document.documentElement.className = 'no-fouc'; | |
| // add to document ready: $('.no-fouc').removeClass('no-fouc'); | |
| </script> |
| <!doctype html> | |
| <title>Site Maintenance</title> | |
| <style> | |
| body { text-align: center; padding: 150px; } | |
| h1 { font-size: 50px; } | |
| body { font: 20px Helvetica, sans-serif; color: #333; } | |
| article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
| a { color: #dc8100; text-decoration: none; } | |
| a:hover { color: #333; text-decoration: none; } | |
| </style> |
| This playbook has been removed as it is now very outdated. |