Skip to content
Selene Melo edited this page May 5, 2021 · 2 revisions

Welcome to the RESTful-API wiki!

REpresentational State Transfer API

  1. GET: Retrieve resources
  2. POST: Create resources
  3. PUT: Update resources
  4. DELETE: Delete resources
  • Framework: Laravel
  • Requests: PHP, VScode, Postman, Wamp, GitBash

Command lines

 $ composer create-project --prefer-dist laravel/laravel learning 
 $ php artisan serve
   Laravel development server started: http://127.0.0.1:8000 

Migrations

  • Upload database and add its credentials to the .env file located in the root of the project.
    • DB_DATABASE = learning
    • DB_USERNAME = root
    • DB_PASSWORD =
  • Run $ php artisan make:model Article -m
  • Go to class CreateUsersTable() and add two lines:
    • $table->string('title')
    • $table->string('body')
  • Run $ php artisan migrate
  • Activate XAMPP control Panel and start MYSQL
  • Acess: http://localhost/phpmyadmin/
Clone this wiki locally