How to step by step learn laravel

Laravel 4.2 create a project special basically step  

1) creating project

            first intall composer
->composer create-project laravel/laravel testing 4.2

2) require changes
->
    app/config/database
        'mysql' => array(
            'driver'    => 'mysql',
            'host'      => '127.0.0.1',
            'database'  => 'laravel',
            'username'  => 'root',
            'password'  => '',
            'charset'   => 'utf8',
            'collation' => 'utf8_unicode_ci',
            'prefix'    => '',
        ),
      

3)routing process
->

    1)controller      

        public function index()
        {
            return View::make('jignesh');
        }
    2)route
        call controller
       
        Route::get('/jignesh', 'UsersController@index');
       
    3)view
   
        <h1>welcome </h1>
        {{  "jignesh" }}

3) create database

->  creating migrate using command prompt

    php artisan migrate:make first
   
    after creating migrate in up method
   
    Schema::create('users', function($table)
        {
            $table->increments('id');
            $table->string('email',100);
            $table->string('password',64);
            $table->string('remember_token');
            $table->timestamps();
        });
       
        php artisan migrate
Share on Google Plus

About quora Questions & Answers A-Z

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment