Download the PHP package bolivir/laravel-doctrine-sanctum without Composer
On this page you can find all versions of the php package bolivir/laravel-doctrine-sanctum. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bolivir/laravel-doctrine-sanctum
More information about bolivir/laravel-doctrine-sanctum
Files in bolivir/laravel-doctrine-sanctum
Package laravel-doctrine-sanctum
Short Description Laravel doctrine integration for the official laravel-sanctum package
License MIT
Informations about the package laravel-doctrine-sanctum
Laravel Doctrine Sanctum
The original Laravel Sanctum works via eloquent, this package makes it work with laravel-doctrine/orm package (https://github.com/laravel-doctrine/orm)
Versions
Version | Supported Sanctum Version | Supported Laravel-Doctrine ORM Version |
---|---|---|
~1.0 | ^2.0 | ^1.0 |
~2.0 | ^2.0 | ^2.0 |
~3.0 | ^3.0 | ^2.0 |
~4.0 | ^4.0 | ^2.0 |
Installation
Start by installing the package with the following command:
To publish the config use:
Configuration / Setup
Creating the Access Token Model
Start by creating your accessTokenModel, and implement the interface
IAccessToken
.
You can use the Trait TAccessToken
or just implement the interface by your self.
Updating the UserModel
Your user model should implement the interface ISanctumUser
.
You dont need to implement the Authenticable
on your user model directly, it is required inside the ISanctumUser
Now you can choose to use the trait TAccessToken
or implement the interface yourself.
Creating the database table
Laravel sanctum uses the database to store the access tokens. There are multiple options available to generate the database table sql
- If you are using laravel migrations, run
migrations:diff
after the creation of your model and metadata (xml). Then execute the migration withmigrations:migrate
Ready to use
Implement your login logic and start creating access tokens on succesfull login.
See the WIKI for more detailed steps.
All versions of laravel-doctrine-sanctum with dependencies
ext-json Version *
laravel-doctrine/orm Version ^2.0.0
laravel/sanctum Version ^v4.0
ramsey/uuid-doctrine Version ^2.0.0