wyxos / shift-php
Laravel SDK to integrate and sync tasks with the SHIFT Dashboard.
Requires
- wyxos/shift-core: ^0.1.0
- dev-master
- 1.1.50
- 1.1.49
- 1.1.48
- 1.1.47
- 1.1.46
- 1.1.45
- 1.1.44
- 1.1.43
- 1.1.42
- 1.1.41
- 1.1.40
- 1.1.39
- 1.1.38
- 1.1.37
- 1.1.36
- 1.1.35
- 1.1.34
- 1.1.33
- 1.1.32
- 1.1.31
- 1.1.30
- 1.1.29
- 1.1.28
- 1.1.27
- 1.1.26
- 1.1.25
- 1.1.24
- 1.1.23
- 1.1.22
- 1.1.21
- 1.1.20
- 1.1.19
- 1.1.18
- 1.1.17
- 1.1.16
- 1.1.15
- 1.1.14
- 1.1.13
- 1.1.12
- 1.1.11
- 1.1.10
- 1.1.9
- 1.1.8
- 1.1.7
- 1.1.6
- 1.1.5
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.81
- 1.0.79
- 1.0.78
- 1.0.77
- 1.0.76
- 1.0.74
- 1.0.73
- 1.0.72
- 1.0.71
- 1.0.70
- 1.0.69
- 1.0.67
- 1.0.66
- 1.0.65
- 1.0.64
- 1.0.63
- 1.0.62
- 1.0.61
- 1.0.58
- 1.0.57
- 1.0.56
- 1.0.55
- 1.0.54
- 1.0.53
- 1.0.52
- 1.0.51
- 1.0.50
- 1.0.49
- 1.0.48
- 1.0.47
- 1.0.46
- 1.0.45
- 1.0.44
- 1.0.42
- 1.0.41
- 1.0.40
- 1.0.38
- 1.0.37
- 1.0.36
- 1.0.35
- 1.0.34
- 1.0.33
- 1.0.32
- 1.0.31
- 1.0.30
- 1.0.29
- 1.0.26
- 1.0.25
- 1.0.24
- 1.0.21
- 1.0.14
- 1.0.13
- 1.0.11
- 1.0.10
- v1.0.1
This package is auto-updated.
Last update: 2026-04-01 06:12:42 UTC
README
A Laravel package for submitting tasks to the SHIFT Dashboard from within your application. It provides a Vue-based UI component plus API endpoints to send issue reports or feature requests directly to your SHIFT project.
Installation
composer require wyxos/shift-php php artisan install:shift
By default, install:shift now uses the SHIFT browser/device verification flow:
- Validates
APP_ENVandAPP_URL - Creates a SHIFT install session
- Prints the verification URL and short code for browser approval
- Polls until the session is approved or expires
- Loads the projects you can install into and lets you choose one, or create a new standalone SHIFT project if none exist yet
- Finalizes the install and writes
SHIFT_TOKEN/SHIFT_PROJECT - Registers the current app environment for external collaborator lookup
- Scaffolds
App\Services\ShiftCollaboratorResolverwhen it does not exist - Publishes frontend and config files
If SHIFT_TOKEN and SHIFT_PROJECT are already configured, the installer keeps using those values and skips browser verification.
If you need the old raw-token path, run:
php artisan install:shift --manual
Configuration
Add your SHIFT credentials to .env:
SHIFT_TOKEN=your-api-token SHIFT_PROJECT=your-project-token SHIFT_URL=https://shift.wyxos.com SHIFT_COLLABORATORS_RESOLVER=App\Services\ShiftCollaboratorResolver
Optional: publish config to customize routes and middleware.
php artisan vendor:publish --tag=shift
config/shift.php example:
return [ 'token' => env('SHIFT_TOKEN'), 'project' => env('SHIFT_PROJECT'), 'url' => env('SHIFT_URL', 'https://shift.wyxos.com'), 'routes' => [ 'prefix' => 'shift', 'middleware' => ['web', 'auth'], ], ];
Usage
UI Dashboard
After installing, the task submission UI is available at:
/shift
This route uses the default web and auth middleware unless you customize it.
API Endpoints
All endpoints are prefixed by default with /shift/api and require authentication:
GET /shift/api/tasks- List tasksPOST /shift/api/tasks- Create a new taskGET /shift/api/tasks/{id}- View a taskPUT /shift/api/tasks/{id}- Update a task
You can interact with them using Laravel's Http facade:
$response = Http::post('/shift/api/tasks', [ 'title' => 'Bug in report form', 'description' => 'Submit button does not work on mobile.', ]);
When tasks are submitted, the package automatically includes:
- The authenticated user's name, email, and ID
- The current environment and application URL
External Collaborators
install:shift registers the current consumer environment with SHIFT, and the package exposes:
GET /shift/api/collaborators/external
SHIFT calls this endpoint using the project token to retrieve eligible external users for the selected project environment.
The generated resolver is intentionally permissive only for APP_ENV=local. For every other environment it returns no users until you replace the TODO stub with your app-specific rules.
Testing
Run a test submission with:
php artisan shift:test
This creates a dummy task to verify setup.
Artisan Commands
install:shift- Interactive installationinstall:shift --manual- Manual raw token and project entryshift:test- Submit a test taskshift:publish- Manually publish package assets
License
MIT Wyxos. See LICENSE.md for details.