pouya-parsaei / laravel-to-do
Laravel To-Do package with authentication
Installs: 5
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/pouya-parsaei/laravel-to-do
This package is auto-updated.
Last update: 2025-10-28 00:34:55 UTC
README
Laravel To-Do package with authentication
Installation
- Install package with composer:
composer require pouya-parsaei/laravel-to-do - To authenticate user If
UserModel has$fillableproperty, you must addapi_tokento this array:
protected $fillable = ['name', 'email', 'password','api_token']; - add
HasTasksandHasTokentraits toUserModel:
<?php
namespace App;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use PouyaParsaei\LaravelToDo\Traits\HasTasks;
use PouyaParsaei\LaravelToDo\Traits\HasToken;
class User extends Authenticatable
{
use Notifiable, HasTasks, HasToken;
}
- set your
MAILsettings in.envfile - set your
QUEUE_CONNECTIONin.envfile ####note: - If you want to use
databaseasQUEUE_CONNECTIONand already don’t have jobs table in database, create it:
php artisan queue:table - If you already do not have
notificationstable in the database, create it:
php artisan notification:table - In
app/Exceptions/Handler.phpuseResponseHelperTrait and editrenderfunction like this:
<?php
namespace App\Exceptions;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use PouyaParsaei\LaravelToDo\Helpers\ResponseHelper;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Illuminate\Database\Eloquent\ModelNotFoundException as IlluminateModelNotFoundException;
use Throwable;
class Handler extends ExceptionHandler
{
use ResponseHelper;
public function render($request, Throwable $exception)
{
if (($exception instanceof NotFoundHttpException || $exception instanceof IlluminateModelNotFoundException) && $request->wantsJson()) {
return $this->respondNotFound(trans('todo::messages.errors.not found'));
}
return parent::render($request, $exception);
}
}
- run migrate:
php artisan migrate - start worker:
php artisan queue:work