Skip to content

smutech/rest-api

Repository files navigation

REST API (Laravel)

REST API created using Laravel 8, popular web application framework.

Quick start

# Install dependencies
composer install

# Create environment
cp .env.example .env

# Run migrations and seeds
php artisan migrate --seed

# Generate application key
php artisan key:generate

# Start server
php artisan serve

Endpoints

Categories

List all categories with links and meta

GET api/v1/categories

List single category

GET api/v1/categories/{id}

Add category (Required field: name)

POST api/v1/categories

Update category (Required field: name)

PUT api/v1/categories/{id}

Delete category

DELETE api/v1/categories/{id}

Posts

List all posts with links and meta

GET api/v1/posts

List single post

GET api/v1/posts/{id}

Add post (Required fields: title, body, category_id)

POST api/v1/posts

Update post (Required fields: title, body, category_id)

PUT api/v1/posts/{id}

Delete post

DELETE api/v1/posts/{id}

About

REST API using Laravel 8 resources.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published