Laravel 4.2 create a project special basically step
1) creating projectfirst 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
0 comments:
Post a Comment