Skip to content

Instantly share code, notes, and snippets.

@anestan
Last active December 19, 2018 05:15
Show Gist options
  • Save anestan/f52b57a14a574e845eabc66d5aa86b59 to your computer and use it in GitHub Desktop.
Save anestan/f52b57a14a574e845eabc66d5aa86b59 to your computer and use it in GitHub Desktop.
install laravel di windows

install xampp

https://www.apachefriends.org/download.html

install composer

https://getcomposer.org/Composer-Setup.exe

pilih php.exe di -> /xampp/php/php.exe

install laravel global

composer global require "laravel/installer=~1.1"

ini biar bisa -> laravel new blog

setx /M path "%path%;%appdata%\Composer\vendor\bin"

kalau di mac, run di terminal

install oh my zsh, dan edit di ~/.zshrc file
export PATH="$PATH:$HOME/.composer/vendor/bin"

install laravel app

cd ke folder yang mau di install laralel misal cd D:/xampp/laravel lalu

laravel new blog

nanti akan tercreate folder di dalam D:/xampp/laravel/blog

Setup virtual hosts

edit D:\xampp\apache\conf\extra\httpd-vhosts.conf

tambah ini

<VirtualHost *:80>
     ServerName localhost
     DocumentRoot "D:\xampp\htdocs"
     <Directory "D:\xampp\htdocs">
         DirectoryIndex index.php
     </Directory>
 </VirtualHost>
 
<VirtualHost *:80>
    DocumentRoot "D:/xampp/htdocs/laravel/blog/public"
    ServerName blog.dev
    SetEnv APPLICATION_ENV development
    <Directory "D:/xampp/htdocs/laravel/blog">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

lalu ke C:\Windows\System32\drivers\etc dan edit hosts with administrator

tambah ini 127.0.0.1 blog.dev

stop and restart apache -> klo perlu di close buka lagi app nya

@anestan
Copy link
Author

anestan commented Oct 24, 2017

Abis ubah session di config/session.php

php artisan config:cache

@anestan
Copy link
Author

anestan commented Oct 27, 2017

kalau npm error

rm -rf node_modules && npm cache clean --force && npm install

@anestan
Copy link
Author

anestan commented Dec 19, 2018

edit-edit user di database seeder

kalau install di new computer

tinggal download dr git

trus soal install laravel nya sampai bisa laravel new blog

  1. composer global require laravel/installer
    tar jadi bisa laravel new blog ( cmd ke directory htdocs dulu )

  2. test laravel new blog

  3. kalaus udah ok, copy hasil download zip lpp dari bitbucket

  4. taro di xampp

  5. bikin database ( lpp )

  6. buat .env file pake vscode

  7. composer install

  8. php artisan key:generate

  9. php artisan serve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment