How to install laravel framework?

Composer :-

A composer is a tool. It enables a user to generate a project concerning the specified framework. Third party libraries can be installed efficiently with the help of composer.


Artisan :-

Command line interface utilised in Laravel is named Artisan. It comprises a collection of commands which aids in developing a web application. These commands are consolidated from the Symphony framework, appearing in add-on hallmarks in Laravel 5.1.


download composer setup.exe

Open this URL and download composer to install it.
https://getcomposer.org/download/


  • install the composer setup.exe file
  • check developer mode
  • You set composer location. C:\composer
  • choose command line php :- c:\xampp\php\php.exe
  • Add this php to your path check the box
  • Next
  • Next
  • install
  • Next
  • Finish

  • open command promtp
    c:\>composer -v
    c:\>cd..
    c:\>d :
    d:\>cd xampp
    d:\xampp>cd htdocs
    d:\xampp\htdocs>composer
    d:\xampp\htdocs>composer create-project laravel/laravel itechxpert --prefer-dist
    you wait appros 5 to 10 minutes then install set successfully.

    d:\xampp\htdocs>cd itechxpert
    d:\xampp\htdocs\itechxpert>dir

    http://localhost/itechxpert/public

    it show laravel

    that means it install successfully.

    For help :- https://www.youtube.com/watch?v=o0EHWSTECvY


    <

    How to check version of laravel

    c:\xampp\htdocs>composer create-project laravel/laravel itechxpert --prefer-dist

    it install the current version of laravel framework.


    c:\xampp\htdocs\itechxpert>php artisan --version

    Step 1 − Now you need to type the following command to create new Laravel project using composer.
    composer create project –prefer-dist laravel/laravel itechxpert
    OR
    composer create-project laravel/laravel itechxpert --prefer-dist
    You can replace itechxpert with your desired project name.

    Step 2 − The above command will install Laravel in the current directory. Start the Laravel service by executing the following command.
    php artisan serve

    c:/xampp/htdocs/itechxpert>php artisan serve

    Step 3 − Copy the URL underlined in gray in the above screenshot and open that URL in the browser. If you see the following screen, it implies Laravel has been installed successfully.


    you need to test the installation by opening the following link in your browser. http://Localhost/itechxpert/public/ Again if you want, then you can change or replace the mylaravel with your project name.

    install laravel

    composer create-project --prefer-dist laravel/laravel itechxpert

    How to install version of laravel

    composer create-project --prefer-dist laravel/laravel itechxpert "6.0.*"

    composer create-project --prefer-dist laravel/laravel blog "5.4.*"

    How to install laravel UI dev

    composer require laravel/ui --dev


    composer require laravel/ui "1.2"

    if show this error then

    don't install illuminate/filesystem v7.0.4|don't install laravel/framework v6.18.0 - Installation request for laravel/framework (locked at v6.18.0, required as ^6.0) -> satisfiable by laravel/framework[v6.18.0]. - Installation request for laravel/ui ^2.0 -> satisfiable by laravel/ui[2.x-dev, v2.0.0, v2.0.1].



    Note :- larvel/ui 2.0 version only install laravel 7. so you install lower version.

    laravel 6 support laravel/ui 1.2 version

    composer require laravel/ui "1.2"

    laravel 6.18 for require laravel/ui "1.2".


    install vue auth

    File name : index.php

    php artisan ui vue --auth


    Vue scaffolding installed successfully. Please run "npm install && npm run dev" to compile your fresh scaffolding. Authentication scaffolding generated successfully.

    install npm

    npm install

    npm run dev
    //or
    npm run watch

    Laravel 7+ then just run: composer require laravel/ui No need to specify the version

    laravel/ui ^2.0 requires Laravel 7+ So I decided to go with a previous version, especifically the following: composer require laravel/ui "^1.2"


    How to install vue Js in laravel?

    If you want to install vue in laravel 6 project then install laravel ui.

    composer require laravel/ui

    After successfully install UI package then ready to install vue with our project.


    we can install two way, one is a simple vue setup install and another is install vue with auth. So let's see both way.

    Install Vue

    php artisan ui vue
    Install Vue with auth

    php artisan ui vue --auth

    Now we installed vue, you can see your resource directory js folder. app.js file

    install npm

    You also need to install npm and run it. so let's run both command:
    npm install

    Run NPM

    npm run dev

    After that you can work with your vue application.



    How to install laravel 7?

    C:\xampp\htdocs>laravel new itechxpert

    #################### OR ####################

    C:\xampp\htdocs>composer create-project laravel/laravel itechxpert "7.0.*"

    C:\xampp\htdocs>cd itechxpert

    C:\xampp\htdocs\itechxpert>

    C:\xampp\htdocs\itechxpert>composer require laravel/ui --dev
    C:\xampp\htdocs\itechxpert>composer require laravel/ui "2.0"
    Using version ^2.2 for laravel/ui
    ./composer.json has been updated
    Loading composer repositories with package information
    Updating dependencies (including require-dev)
    Package operations: 1 install, 0 updates, 0 removals
    - Installing laravel/ui (v2.2.0): Downloading (100%)
    Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
    Writing lock file
    Generating optimized autoload files
    > Illuminate\Foundation\ComposerScripts::postAutoloadDump
    > @php artisan package:discover --ansi
    Discovered Package: facade/ignition
    Discovered Package: fideloper/proxy
    Discovered Package: fruitcake/laravel-cors
    Discovered Package: laravel/tinker
    Discovered Package: laravel/ui
    Discovered Package: nesbot/carbon
    Discovered Package: nunomaduro/collision
    Package manifest generated successfully.
    48 packages you are using are looking for funding.
    Use the `composer fund` command to find out more!

    C:\xampp\htdocs\itechxpert>php artisan ui bootstrap --auth

    Bootstrap scaffolding installed successfully.
    Please run "npm install && npm run dev" to compile your fresh scaffolding.
    Authentication scaffolding generated successfully.

    C:\xampp\htdocs\itechxpert>npm install


    C:\xampp\htdocs\itechxpert>npm run dev

    laravel MIX build successful notification

    C:\xampp\htdocs\itechxpert>php artisan serve

    .htaccess

    copy .htaccess file from public directory to root directory. and paste the below code in that .htaccess file.

    ' <IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
    Options -MultiViews
    </IfModule>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} -d [OR]
    RewriteCond %{REQUEST_FILENAME} -f
    RewriteRule ^ ^$1 [N]
    RewriteCond %{REQUEST_URI} (\.\w+$) [NC]
    RewriteRule ^(.*)$ public/$1
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ server.php
    RewriteCond %{SERVER_PORT} 80

    </IfModule>

    # BEGIN cPanel-generated php ini directives, do not edit
    # Manual editing of this file may result in unexpected behavior.
    # To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
    # For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI)
    <IfModule php7_module>
    php_flag display_errors Off
    php_value max_execution_time 120
    php_value max_input_time 60
    php_value max_input_vars 1000
    php_value memory_limit 512M
    php_value post_max_size 8M
    php_value session.gc_maxlifetime 1440
    php_value session.save_path "/var/cpanel/php/sessions/ea-php72"
    php_value upload_max_filesize 2M
    php_flag zlib.output_compression Off
    </IfModule>
    <IfModule lsapi_module>
    php_flag display_errors Off
    php_value max_execution_time 120
    php_value max_input_time 60
    php_value max_input_vars 1000
    php_value memory_limit 512M
    php_value post_max_size 8M
    php_value session.gc_maxlifetime 1440
    php_value session.save_path "/var/cpanel/php/sessions/ea-php72"
    php_value upload_max_filesize 2M
    php_flag zlib.output_compression Off
    </IfModule>

    .env file

    set database details in .env file.

    APP_URL=http://localhost/itechxpert/

    LOG_CHANNEL=stack

    DB_CONNECTION=mysql
    DB_HOST=127.0.0.1
    DB_PORT=3306
    DB_DATABASE=itechxpet
    DB_USERNAME=root
    DB_PASSWORD=

    # use # tag for comment line in env file
    # comment in env file
    # Email Setting





    Previous Next


    Trending Tutorials




    Review & Rating

    0.0 / 5

    0 Review

    5
    (0)

    4
    (0)

    3
    (0)

    2
    (0)

    1
    (0)

    Write Review Here


    Ittutorial