- Install Laragon
- Install Git
- Signup for Github Account
-
Create project
- Menu > Laravel > Create Project > Lumen
- project name: cord-app-api
- if ask for token, generate in GitHub > Settings > Personal Access Token:repo
- http://cord-app-api.dev
- Menu > Laravel > Create Project > Lumen
-
Create database
CREATE DATABASE cord-app
-
Configure
.env
- Set database details - database name, user & password
- Generate 32 character random key(use online tools for this).
-
Create model and save in app/
- Enable Eloquent in
bootstrap/app.php
, Line 28 - Schema
- locations
- id
- name
- description
- photo
- latitude
- longitude
- locations
- Enable Eloquent in
-
Create migration scripts and execute
php artisan make:migration create_locations_table --create=locations
php artisan migrate
-
Update migration scripts schema
php artisan make:migration update_location_table --table=locations
php artisan migrate
-
Create factories
-
Update
database/seeds/DatabaseSeeder.php
and runphp artisan db:seed
-
Setup Route
app/Http/routes.php
- show all record
- get specific record
- create record
- update record
- delete record
-
Setup Controller
app/Http/Controller/Location.php
- index
- store
- show
- update
- destroy
-
Eloquent
- Create (store)
- Read (show)
- Update (update)
- Delete (destroy)
Documentation for the framework can be found on the Lumen website.
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell at [email protected]. All security vulnerabilities will be promptly addressed.
The Lumen framework is open-sourced software licensed under the MIT license