01 – Composer & The Laravel Installer



in this video we're going to be going over installing composer and the laravel installer on your machine so if we go ahead and go to get composer org and we scroll down we can click on the getting started button and once we click there we will want to click on the globally you can either search for this or just click on this right here and we have instructions on how to install composer on our machine so the first step we will want to do is copy this first line and paste this into terminal or command prompt and this will install the composer executable on your machine ok and after we have done that then the next command will move the executable to a global directory so if we paste that in there and then we can go ahead and clear this out and now we should be able to type in composer and now we will see a list of composer commands so we can run all of these commands on our machine since it is now globally accessible so the next thing that we will want to do is go to laravel comm and we can click on the documentation and then you should see the installation instructions you can also click on the installation button over here on the left and if we scroll down to installation you'll see where it says installing laravel and if we go down a little bit more we have this command that we can install the laravel installer via composer so let's go ahead and copy that and paste that into our terminal or command prompt ok and after that has been completed now we can go ahead and use our new laravel command so we could say laravel new application and as you can see a new laravel app gets installed into our application folder so if I CD into the application folder I can then go ahead and run the PHP artisan serve command and it will say that I have a local development server started at localhost 8080 thousand sure enough I see a blank layer of l5 installation on my screen so there's one thing that I want to point out is if you type in laravel new application or laravel new blog or you try and use the laravel command and it is not working you will need to add the composer bin directory to your zsh RC or your bash file basically you will need to make it globally available on your machine and I am going to paste a link below that will show you how to do this but just in case if you do have problems doing the laravel new command then check out the link below the video and it will show you how to make your composer been globally accessible so let's move on to talking about the level 5 directory structure

24 thoughts on “01 – Composer & The Laravel Installer

  1. Composer is pretty easy to use for anyone. With a single command, you can install Laravel using Composer (http://www.cloudways.com/blog/composer-with-laravel/ ) on your host. This saves you a lot of time and efforts. All you have to do is install composer on your host first.

  2. Microsoft Windows [Version 6.3.9600]
    (c) 2013 Microsoft Corporation. All rights reserved.

    C:UsersHTS>d:

    D:>cd xampphtdocslaravel48

    D:xampphtdocslaravel48>php artisan migrate
    Migration table created successfully.

    [IlluminateDatabaseQueryException]
    SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was t
    oo long; max key length is 767 bytes (SQL: alter table `users` add unique `
    users_email_unique`(`email`))

    [PDOException]
    SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was t
    oo long; max key length is 767 bytes

    D:xampphtdocslaravel48>

  3. Hi devdojo, I followed all of your steps but when I write: "laravel new application" the terminal answers me: "command not found"
    How can I proceed?
    Many thanks in advance.

  4. Hi. Thanks for putting this together. I've been having trouble understanding how to configure the PATH in my .zshrc file. Not even sure how it's supposed to look. The link to the resource is bringing up a 404.

  5. How does this work exactly with vmware or virtualbox…….I have a computer to start database development for my site, how would i get all these things setup on there?? Would i need to install an OS like windows 10, then virtual box ahow do i get it on the virtual machine, how does all that work
    ?????

  6. For anyone on Windows having a problem with getting the "laravel" command to work:

    1. Locate your C:Users{Username}AppDataRoamingComposervendorbin
    2. Open your Control Panel and navigate to "System and Security" then "System"
    3. Open "Advanced system settings" in the left bar
    4. Here open the "Advanced" tab
    5. Open "Environment Variables…" at the bottom
    6. Look at the bottom half of this window that is titled "System variables" and scroll down until you see a Variable named "Path"
    7. Select the "Path" row, and select "Edit…" at the bottom
    8. Copy and Paste the path from step 1 at the end of what is in the "Variable Value"
    9. Make sure there is a semi-colon before and after the new path you just pasted in the Edit window

    That's it! You should be able to use the laravel command from anywhere now!

    To test it simply open a blank cmd prompt and type "laravel"

    Hope that helps!

    Just realized he has a link in the description for this, but I hope it's still useful

  7. goddamn!! boss told me : "Hey can you try building something with Laravel 5?" I answered : "ehhh I will see, never used it …" and he replied : "mmmkay let me know …" and THEN I found your videos. It will help me a lot! Thank you buddy!

  8. Thanks a lot fot this tutorial. It was useful to know all about this framework just in one hour (maybe less). :=)

  9. for people how find it hard to install composer manualy use this https://getcomposer.org/Composer-Setup.exe

  10. Can I manually move the composer without using the cmd… its the system cant find the specified path

  11. hey every time i trip the command for installion i get error that say
    Fatal error: Uncaught exception 'RuntimeException' with message 'Failed to decode zlib stream' in -:658
    i don't know how to fix that error
    pls help me sir

Leave a Reply

Your email address will not be published. Required fields are marked *