(試験的に勉強兼ねて英語で書いてみた)
Goal
- To learn from the environment setup to the fundamental usage
- To create a To-do app with Laravel
Environment setup
0. Development environment
Mac OS Catalina 10.15.4
MacBook Air (13-inch, Mid 2013)
1. Downloading & Installing
1.1. Choosing the version
Laravel 7 (the latest version as of May 2020)
PHP 7.3.11 (Laravel 7 requires above 7.2.5)
1.2. Installing composer
Access the above website and click Download
Execute these four lines on this webpage like:
$ php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
$ php -r "if (hash_file('sha384', 'composer-setup.php') === 'e0012edf3e80b6978849f5eff0d4b4e4c79ff1609dd1e613307e16318854d24ae64f26d17af3ef0bf7cfb710ca74755a') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
$ php composer-setup.php
$ php -r "unlink('composer-setup.php');"
They mean that in order:
・ Download the installer to the current directory
・ Verify the installer SHA-384
・ Run the installer
・ Remove the installer
Move Composer
$ mv composer.phar /usr/local/bin/composer
Check if it succeeded
$ composer -V
Composer version 1.10.6 2020-05-06 10:28:10
1.3. Installing Laravel
Create a project called sample
, or what else you like.
$ composer create-project --prefer-dist laravel/laravel sample
1.4. Starting a server
Move into the directory you made and start a server.
$ cd sample
$ php artisan serve
Try to access your local server: http://localhost:8000
on a web browser!
Congratulations!!
Creating a ToDo app
Now I start to create a ToDo app known as that is simple and easy to develop for even a beginner.
I referred to this website:
Laravelの知識ゼロから基本をマスターするチュートリアル | Awesome Blog