Skip to main content

Posts

Showing posts with the label Laravel

Artisan commands in Laravel

Usage of Laravel CLI tool (astisan) This is blogs is specifically for Laravel version 5.2. Artisan provides number of helpful commands for developing project. It is driven by Symfony console component. To use artisan command you should be in your project directory. 1. To see list of all artisan commands       php artisan list 2. To create controller php artisan make:controller YourController or, php artisan make:controller YourController --resource     option "--resource" will generate all REST function (index, store, show, ...) 3. To create migration table php artisan make:migration create_users_table --create=users      It will create a file in /database/migration directory. Use snake case for creating migration so that it will create class like CreateUsersTable.      To migrate tables in to the database use command: php artisan migrate       Rollback migrations: php artisan migrate:rol...

How to install Laravel on Ubuntu

To install Laravel you must have install LAMP stack (Linux, Apache2, MySql, and PHP) on your Ubuntu system Install LAMP: If not installed LAMP sudo apt-get install apache2 sudo apt-get install php5 sudo apt-get install mysql-server sudo apt-get install php5-mysql Install PHP extensions Some PHP extensions are necessary to install before installing Laravel 1.  unzip used for the unzip laravel sudo apt-get install unzip 2. Use Composer (which needs CURL) sudo apt-get install curl 3. Use Composer (which downloads via HTTPS, usable only with install Openssl) sudo apt-get install openssl 4. Use Laravel 4 (which needs mcrypt) sudo apt-get install php5-mcrypt Install Composer curl -sS https://getcomposer.org/installer | php sudo mv composer.phar /usr/local/bin/composer Activate mod_rewrite sudo a2enmod rewrite sudo service apache2 restart Open the default vhost config file: sudo nano /etc/apache2/sites-available/default Now search for "AllowOv...