Skip to content

BinarCode/restify-demo

Repository files navigation

This is a demo project that mimic the inertia CRM example in Restify.

Prerequisites

This installation assume you already have:

Installation

You can install the package via composer:

Clone the project into a valet folder. For simplicity name your folder as retify-demo (the postman collection uses this as a host).

Clone the repo:

git clone https://github.com/BinarCode/restify-demo.git
cd restify-demo

Install dependencies:

composer install

Prepare a MySQL database named restify_demo and run the migration:

php artisan migrate --seed

Now you should be able to load the list of organizations:

GET http://restify-demo.test/api/restify/organizations

And contacts:

GET http://restify-demo.test/api/restify/contacts

Paginated contacts with organization:

GET http://restify-demo.test/api/restify/contacts?include=organization&page=2&perPage=5

Authenticate

The seeded user has the email and password:

{
    "email": "johndoe@example.com",
    "password": "secret!"
}

So you can login with this account in postman:

POST http://restify-demo.test/api/restify/login

Now uncomment the config retify.middleware of auth:sanctum so you can use the authorization token to perform the profile request:

GET http://restify-demo.test/api/restify/profile

Postman

Download the Postman collection here. And configure the {{host}} to http://restify-demo.test into the collection.

Learn more

Here is a quick video of how I started this repo loom video.

If you are a visual learner, checkout our video course for the Laravel Restify.

Restify documentation.

My twitter.

Security

If you discover any security related issues, please email eduard.lupacescu@binarcode.com instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published