Laravel Quickies

Laravel Quickies is a quick tutorial I developed to help you remember how to do the major coding steps for the Laravel MVC PHP framework. If you don’t have an idea of how to do the things in this tutorial yet, you should probably read the more detailed tutorials I’ve written on each of the subjects below. This is meant just as a quick reference guide for those that already know the basics but need a quick refresher course in the high level steps to do things such as create a route, model, view or migration for example.

Laravel Quick Start Examples


Enter the following code into routes.php to create a simple route:

Route::get(‘test’, function(){

return(‘<h1>Laravel Route Example</h1>Ian L. of created this simple Laravel route test.’);


visit the full Laravel routes tutorial here:


Add the following in a new file within the app/controllers directory to create a new controller:

class yourClass extends BaseController {

public function yourFunction() {

return “<h1>This is what gets output to the web page when the test route is visited by a user in this basic Controller Example</>”;


The above controller would need the following route set up in routes.php to make it work:

Route::get(‘test’, ‘yourClass@yourFunction’);

Finally, after you create a new controller, you always need to flush the autoload contents before the new controller will work, so do so by opening your command prompt that you use composer from and type:

composer dump-autoload

More Laravel quickies coming soon! For now, you can view all of my Laravel tutorials and posts by visiting the Laravel Category of my blog HERE!