I deployed a Laravel app on Heroku, using Cloudflare for SSL. As a quick note, here’s how I did it. Deploy the app on Heroku and make sure everything works fine using the heroku app url. Add the domain names to your app in Heroku (in the settings tab for the app). Make sure… Read More »
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:
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:
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 »
For checking the emails going out from your local server (without actually sending them). Use papercut. https://papercut.codeplex.com/ If you’re using Laravel, then make sure to setup your app/config/mail.php correctly: ‘driver’ => ‘smtp’, ‘host’ => ‘localhost’, ‘port’ => <your papercut port>, ‘encryption’ => ”,
Different ways of getting a single model and checking if it’s there.
To protect routes, in Laravel, from unauthorized visits you can use route groups. All routes in group will be affected by the auth before filter.