Basic Laravel Training (for CV)
								
								Jump to navigation
				Jump to search
				
					
								
							
		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 are- Http- 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)
