Download the PHP package nrikiji/breeze-api without Composer

On this page you can find all versions of the php package nrikiji/breeze-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package breeze-api

laravel-breeze-api

This is a package for easy implementation of API endpoints based on Breeze.

Since it provides only API, it does not have any files (blade, javascript, css) related to Breeze's View.

It is also used in conjunction with Sanctum to implement authentication by session and authentication by token in SPA.

setup

Next, install sanctum

Use the HasApiTokens trate in the User model to use API tokens

app/Models/User.php

Add middleware to the API to use Sanctum and sessions

app/Http/Kernel.php

If cors is required

※ example
backend : http://localhost:8000
frontend : http://localhost:3000

.env

app/config/cors.php

To enable user email authentication

Implement the MustVerifyEmail interface

app/Models/User.php

If you need to send an email

Used for email address verification and password reset functions

Configure the mail server

.env

Set the URL for the link that will be included in the confirmation email.

app/Http/Providers/AuthServiceProvider.php

Usage

API Token

User Registration

Resend URL for user email address verification

User email address verification
*The endpoint is determined from the URL in the body of the email.

Login

User information

Logout

Password reset

Password reset2

SPA

axios example
for cors, set withCredentials=true

User Registration

Resend URL for user email address verification

User email address verification
*The endpoint is determined from the URL in the body of the email.

Login

User information

Logout

Password reset

Password reset2

trouble shooting

API responses become HTML (text) instead of JSON.

Add "Accept: application/json" to the HTTP request header. Laravel will try to make the response JSON when using Ajax requests or when this header is specified. Laravel will try to make the response JSON when requesting via Ajax or when this header is specified.

However, we have prepared HandleAuthApiRequests middleware for cases where it is not possible to add this header. Please use it as appropriate. This can be enabled by adding it to app/Http/Kernel.php.

Link


All versions of breeze-api with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3|^8.0
illuminate/filesystem Version ^8.42
illuminate/support Version ^8.42
illuminate/validation Version ^8.42
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package nrikiji/breeze-api contains the following files

Loading the files please wait ....