Welcome to laravel

laravel

Welcoming myself to Laravel framework. Coming from CodeIgniter and CakePHP background makes it easy for someone like me to use Laravel. The MVC concept is the same but the name of the method makes me feel weird sometimes. This post is just for me to make some notes when using Laravel.

  • Make sure to add action_ prefix when creating a method in controller
  • Or just use public $restful = true; and create a method with prefix get_ , post_
  • CakePHP $useTable == public static $table
  • CakePHP $primaryKey == public static $key
  • In codeigniter this->load->view(‘folder/filename’, $data); == return View::make(‘folder.filename’, $data); Notice the dot (.)
  • CakePHP filenameController extends AppController == filename_Controller extends Base_Controller
  • In laravel , Fluent is like CodeIgniter Active record and Eloquent is like CakePHP ORM.
  • Cakephp cake bake console == Bob the builder bundle using Artisan
  • CakePHP hasOne , hasMany , belongsTo == has_one() , has_many() , belongs_to()
  • CakePHP containable == Laravel Eager loading
  • Laravel 4 cannot use bundle. Since Laravel 4 is using composer , use libraries from Packagist . So use Laravel 3 to use bundles.

2 Replies to “Welcome to laravel”

Leave a Reply

Your email address will not be published. Required fields are marked *

CommentLuv badge

This site uses Akismet to reduce spam. Learn how your comment data is processed.