please create a project skeleton with the latest version of laravel.
our social media app is going to provide some rest api under version 1 routes would be
POST v1/login
login [Public]POST v1/video
create new video [Authenticated API]PUT v1/video/{id}/like
like a video [Authenticated API]GET v1/liked/videos
list of videos the login user liked. [Authenticated API]
The goal is to create a simple RESTful api that provide above endpoint. consider all the things you need for a production grade project and implement the endpoint. Login endpoint should accept username/password and generate JWT in response for other authenticated endpoint clients will send this JWT as Bearer token in header.
when you complete the project create a PR and send it for our review.
this project is going to work with Monogdb as data storage.
we have to entity in our database.
we have three collection in our database videos
, likes
, users
- _id ObjectID
- name String
- file String
- created_at UTCDateTime
- created_by ObjectID
- _id ObjectID
- video_id ObjectID
- created_at UTCDateTime
- created_by ObjectID
- _id ObjectID
- username String
- password_hash String
- created_at UTCDateTime
- OTHER REQUIRED FIELDS FOR AUTHENTICATION