This is a random question on Algorithms , Database , Data structure and blog system , built using Laravel web framework and a relational database. The system is designed to manage posts and there reviews .
- Laravel.
- Clone the repository to your local machine using
git clone
. - To access blog system run
cd blog
. - install the required dependencies by running
php composer update
. - Create a copy of the
.env.example
file and name it.env
runcp .env.example .env
. - Generate Laravel application key run
php php artisan key:generate
. - Run the migrations and seed the database using
php artisan migrate:fresh --seed
. - Run the project using
php artisan migrate:fresh --seed
.
- Run the test cases using
php artisan test
.
Creates a new post in the system.
Request Body:
{
"title": "test",
"body":"test",
"user_id":"1"
}
List User Posts Of the system.
Get All Top Posts of the system.
Add a review to Post.
Request Body:
{
"rating":1,
"comment": "test",
"user_id": 5,
}