Crema React
v-1
v-1
  • About Crema(CRA)
  • Product Overview
  • Folder Structure
  • Installation
    • Pre-Requisites
    • Installing Crema
  • Default Route
  • Customization
    • Template Style
    • Template Mode
    • Template and Sidebar Color
    • Tempate Direction
    • Navigation Style
    • Footer
    • Footer Type
    • Route Transition
  • Multi-Lingual Support
    • Changing Language
    • Adding New Language
  • Sidebar Menu
    • Adding New Menu
  • Route Protection
  • Loggedin User
  • Axios Setup
  • Package.json
  • GitHub Access
  • Slack Community
  • FAQ
  • CRA-SSR
    • About CRA+SSR
    • Installation
    • Folder Structure
    • Route Protection
    • Deploy to server
  • Next.js
    • About Next.JS
    • Installation
    • Folder Structure
    • Deploy to server
  • Next.Js + TypeScript
    • About Next.js + Typescript
    • Installation
    • Folder Structure
    • Deploy to server
  • CRA + TypeScript
    • About CRA + TypeScript
  • Tailwind CSS
    • About Tailwind CSS
  • Styled Component
    • About Styled Component
  • Servers
    • Python
    • Mongoose
    • Laravel
Powered by GitBook
On this page
  • Register User
  • Login User
  • Auth User

Was this helpful?

  1. Servers

Laravel

Here we have some demo APIs listed here -

Register User

POST http://crema-laravel.herokuapp.com/api/users

This endpoint allows you to get free cakes.

Request Body

Name
Type
Description

name

string

Name of the user

email

string

Email of the user

password

string

Password for the account

{
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImlkIjoiNWY0ZjE5ZWNjN2Y5ZGEwMDE3ZDg1YmFkIn0sImlhdCI6MTU5OTAxOTUwMSwiZXhwIjoxNTk5NDUxNTAxfQ.diJyrzPOY-FD7quqhbJ9D5sDdN8Oym40qqfgHoldpdg"
}
{
    "error": "User already exists"
}

Login User

POST http://crema-laravel.herokuapp.com/api/auth

Request Body

Name
Type
Description

email

string

Email of the user

password

string

Password of the account

{
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImlkIjoiNWY0ZjE5ZWNjN2Y5ZGEwMDE3ZDg1YmFkIn0sImlhdCI6MTU5OTA3MDc3MCwiZXhwIjoxNTk5NTAyNzcwfQ.fK3L6ZmU8S7I-i21kJj_0sA212JOPgFaTWeSeAUaORQ"
}
{
    "error": "Invalid Credentials"
}

Auth User

GET http://crema-laravel.herokuapp.com/api/auth

Headers

Name
Type
Description

Authorization

string

Bearer token

{
    "id": 4,
    "name": "Demo User",
    "email": "demo@ample.com",
    "email_verified_at": null,
    "created_at": "2020-09-03T04:25:55.000000Z",
    "updated_at": "2020-09-03T04:25:55.000000Z"
}

Last updated 4 years ago

Was this helpful?