cd /usr/local/bin
php -r "readfile('https://getcomposer.org/installer');" | php
sudo mv composer.phar composer
cd /var/www/
git clone [get the link from bitbucket] # this will clone the repo inside www folder
For basic reference check Laravel Docs
http://laravel.com/docs/session
Storing an item in session
Steps:
<snippet>
<content><![CDATA[
Route::get('test', function() {
// don't convert the tabs into spaces
<?php
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
class DropTables extends Command {
/**
* The console command name.
<?php | |
use Illuminate\Auth\UserTrait; | |
use Illuminate\Auth\UserInterface; | |
use Illuminate\Auth\Reminders\RemindableTrait; | |
use Illuminate\Auth\Reminders\RemindableInterface; | |
class User extends Eloquent implements UserInterface, RemindableInterface { | |
use UserTrait, RemindableTrait; |
<?php | |
Route::get('login', function() | |
{ | |
// just a shortcut to redirec to /login into /cms/login : prevents redirect LOOP | |
return Redirect::route('cms.login'); | |
}); | |
Route::group(array('prefix' => 'cms'), function() | |
{ |
<?php | |
class CMSController extends BaseController { | |
/** | |
* Display the login page. | |
* GET /cms | |
* | |
* @return Response | |
*/ |
Modify the Eloquent model
SluggableInterface
and SluggableTrait
SluggableTrait
(Shorthand to avoid typing the whole path)$sluggable
arraybuild_from
and save_to
build_from value is the field Sluggable will convert as a slug, if the title contains this value: 'this is the title' it will save the slug value in the column you specified in save_to field as 'this-is-the-title'