If you're on linux, you can follow visit http://tecadmin.net/install-laravel-framework-on-ubuntu/
Step 01
If you haven't installed xampp server on your PC, you need to download and install first since it offers the full stack for developing PHP web application.https://downloadsapachefriends.global.ssl.fastly.net/xampp-files/5.6.14/xampp-win32-5.6.14-0-VC11-installer.exe?from_af=true
or
https://bitnami.com/stack/lamp if you're installing for Linux
Step 02
Composer is the basic requirement for laravel development where it handles most of the laravel development dependencies. Download and install the composer with shell menu enabled so that you can run it from right clicking in any windows explorerhttps://getcomposer.org/Composer-Setup.exe
or
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
Step 03
Now it's time to install laravel framework, you can open the composer command prompt by right clicking in any windows explorer and click User composer here and type the following.composer global require "laravel/installer=~1.1"
Now wait for a few minutes while installing laravel on your PC
Make sure to place the ~/.composer/vendor/bin directory in your PATH so the laravel executable can be located by your system.
Composer Directory is located in
C:\Users\<username>\AppData\Roaming\Composer\vendor\bin
Creating a new laravel application
Now you can create a new laravel project by typinglaravel new blog in the command prompt. This will craft a new laravel application ready to run if you create the folder inside htdocs folder or use composer
composer create-project laravel/laravel your-project-name --prefer-dist
Createing a new project with latest laravel version
composer update to update the composer version or
with the version name
composer create-project --prefer-dist laravel/laravel=5.3.* blog
and then
composer update
Now set the application namespace so that it looks niche
php artisan app:name Essentials
Running the test application
Now in your browser, you can type http://localhost/blog/public/ and you will be able to see the crafted laravel application running locally.
If you're running in Ubuntu, you need to give folder permission
sudo chmod 755 -R laravel_project and then
chmod -R o+w laravel_project/storage
composer dump-autoload
or
php artisan cache:clear
chmod -R 777 app/storage
composer dump-autoload
For Laravel 5.4 it needs to give 775 or 777 access to bootstrap/cache folder as wellsudo chmod -R 777 bootstrap/cache/
No comments:
Post a Comment