This will make your Laravel instance available on the web. Make sure your router have port 80 forwarded to your machine. Also make sure no other server applications is blocking the port.
Create migration in console: Use Schema::table() to access existing table (instead of Schema::create() for creating new tables) Then run migrations:
If you have problems with Composer not allowing to update to http-connections add this to composer.json (not recommended to keep in production)
I had a custom post type that only used custom fields, so I needed to generate a post title from there. Here’s one way. You can if course chain as many if else as you want to check other types. functions.php
Generate Seed from Database https://github.com/orangehill/iseed Generate Migrations from Database: https://github.com/Xethron/migrations-generator
This is great if you want to see what queries are actually run when using Eloquent.
Put this in app/start/global.php to get Laravels execution time to the browser console log. L4 This works with L5:
Sometimes you might want to group form elements in arrays. Here’s a way to do that: The structure of the $_POST array will then be:
Simple way to sort an array with usort on a specific value using a comparator.
In a Laravel app I made the users would upload CSV files. The problem was that fgetcsv only allows a single delimiter character, and it needs to be defined. The problem with that is that when a user exports a CSV from MS Excel – it could end up using a wide array of delimiters depending on the locality… Read More »