Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as:
- Simple, fast routing engine.
- Powerful dependency injection container.
- Multiple back-ends for session and cache storage.
- Expressive, intuitive database ORM.
- Database agnostic schema migrations.
- Robust background job processing.
- Real-time event broadcasting.
Laravel is accessible, yet powerful, providing tools needed for large, robust applications. A superb combination of simplicity, elegance, and innovation give you tools you need to build any application with which you are tasked.
- First clone via
git bash
or download it. It is a RESTful api, you will findangular2
app here . - Run this command in your terminal
composer install
- Rename
.env.example
file to.env
- Run this command to generate key
php artisan key:generate
- Create your database and connect it via
.env
file. - Run this command to migrate your database
php artisan migrate
- Run this command to seed your database
php artisan db:seed
- Run this command to live your RESTful api
php artisan serve
it will navigate at http://localhost:8000/
if you go this address in your browser, you will see nothing there !
because it's only api. Don't forget to start mysql
server, if you use mysql
or database will not connect.
- Method
GET
,URI
-http://localhost:8000/api/book
- Method
POST
,URI
-http://localhost:8000/api/book
- Method
PUT
,URI
-http://localhost:8000/api/book/{id}
- Method
DELETE
,URI
-http://localhost:8000/api/book/{id}
- Clone or download angular2 and run this app. You will see data will load from this server to your
angluar
app.
Enjoy !