DB::table('users')->insert( array('email' => 'john@example.com', 'votes' => 0) ); Inserting Records Into A Table With An Auto-Incrementing ID If the table has an auto-incrementing id, use insertGetId to insert a record and retrieve the id: $id = DB::table('users')->insertGetId( array('email' => 'john@example.com',...
Category: laravel
laravel
Laravel: Load method in another controller without changing the url
Use IoC... App::make($controller)->{$action}(); Eg: App::make('HomeController')->getIndex(); and you may also give params App::make('HomeController')->getIndex($params);