Table of contents
How to create a project with Laravel?
The Laravel framework is installed in the "frameworks" folder in the installation directory. To run any command, it is necessary to start the BitNami Console. If you are using a Virtual Appliance or AMI, you can run the commands below directly.
These are the folders that you can find in the laravel folder:
application artisan bundles conf CONTRIBUTING.md laravel license.txt paths.php public readme.md storage
In the "conf " folder, you can find the Apache configuration file. You can modify that you change the URL. In the "application" and "laravel" folders are the Laravel files. The "public" folder will be the only available on the web site.
If you are going to use a database, you can specify the settings in the "application/config/database.php" file.
To enable the sample application, you should uncomment the following line at the end of the installdir/apache2/conf/httpd.conf file:
Include "installdir/frameworks/laravel/conf/laravel.conf"
Then restart the Apache server and point your browser at http://mydomain/laravel/.
./ctlscript.sh restart apache
If you intend to use encryption or sessions, you will need the encryption key store in the "application/config/application.php" file:
'key' => 'random_value_of_32_characters_leght',
To start a new project, you can edit the file installdir/frameworks/laravel/application/routes.php:
Route::get('my-first-project', function()
{
return 'Hello World!';
}); Then restart the Apache server and point your browser at http://mydomain/laravel/index.php/my-first-project/.
./ctlscript.sh restart apache
This framework also ships the Laravel documentation where you can find more information about it, in http://mydomain/laravel/index.php/docs/. You can also see online at http://laravel.com/docs/.


Comments