Difference between revisions of "Basic Laravel Training (for CV)"
Jump to navigation
Jump to search
Line 4: | Line 4: | ||
== Installation == | == Installation == | ||
+ | === Requirements === | ||
+ | * PHP >= 7.1.3 | ||
+ | * OpenSSL PHP Extension | ||
+ | * PDO PHP Extension | ||
+ | * Mbstring PHP Extension | ||
+ | * Tokenizer PHP Extension | ||
+ | * XML PHP Extension | ||
+ | * Ctype PHP Extension | ||
+ | * JSON PHP Extension | ||
+ | * BCMath PHP Extension | ||
+ | === Steps === | ||
# Install LAMP Stack (ie. XAMPP) | # Install LAMP Stack (ie. XAMPP) | ||
# Install Composer | # Install Composer | ||
Line 14: | Line 25: | ||
#: or | #: or | ||
#: <pre>php artisan serve --port=8888 # for running on localhost:8888</pre> | #: <pre>php artisan serve --port=8888 # for running on localhost:8888</pre> | ||
+ | |||
+ | == Basic Tutorial == | ||
+ | === Important directory / file === | ||
+ | * <code>app</code>: Where the models are | ||
+ | ** <code>Http</code> | ||
+ | *** <code>Controllers</code> | ||
+ | *** <code>Middleware</code> | ||
+ | * <code>config</code> | ||
+ | * <code>database</code> | ||
+ | * <code>public</code>: Where the public files (ie. css, js) | ||
+ | * <code>resources</code> | ||
+ | ** <code>views</code> | ||
+ | * <code>routes</code> | ||
+ | ** <code>api.php</code> | ||
+ | ** <code>web.php</code> | ||
+ | * <code>vendor</code>: Where the additional libraries store | ||
+ | * <code>.env</code>: all environment variables (ie. DB username/password) |
Revision as of 16:29, 7 March 2019
Contents
Reference
- Laravel Documentation
https://laravel.com/docs/5.8
Installation
Requirements
- PHP >= 7.1.3
- OpenSSL PHP Extension
- PDO PHP Extension
- Mbstring PHP Extension
- Tokenizer PHP Extension
- XML PHP Extension
- Ctype PHP Extension
- JSON PHP Extension
- BCMath PHP Extension
Steps
- Install LAMP Stack (ie. XAMPP)
- Install Composer
- https://getcomposer.org/doc/00-intro.md#installation-linux-unix-macos
- หมายเหตุ: เวลาเรียกใช้งาน composer อาจจะต้องใช้
./composer.phar
แทนที่composer
ถ้าทำการ Install composer เป็น local
- Create new Laravel Project
composer create-project --prefer-dist laravel/laravel PROJECT_NAME
- Run Local Development Server
php artisan serve # for running on localhost:8000
- or
php artisan serve --port=8888 # for running on localhost:8888
Basic Tutorial
Important directory / file
app
: Where the models areHttp
Controllers
Middleware
config
database
public
: Where the public files (ie. css, js)resources
views
routes
api.php
web.php
vendor
: Where the additional libraries store.env
: all environment variables (ie. DB username/password)