konsulting / spatie-laravel-dashboard
Spatie's Laravel Dashboard package.
Requires
- php: >=7.0.0
- developmint/npm-stats-api: ^1.0
- erusev/parsedown: ^1.6
- fennb/phirehose: ^1.0
- guzzlehttp/guzzle: ^6.2
- knplabs/github-api: ^2.4
- laravel/framework: 5.5.*
- laravel/tinker: ~1.0
- ohdearapp/laravel-ohdear-webhooks: 0.0.2
- pda/pheanstalk: ^3.1
- php-http/guzzle6-adapter: ^1.1
- pusher/pusher-php-server: ^3.0
- spatie/laravel-google-calendar: ^2.0
- spatie/laravel-twitter-streaming-api: ^0.0.2
- spatie/last-fm-now-playing: ^1.0
- spatie/packagist-api: ^1.0.1
- spatie/valuestore: ^1.1
Requires (Dev)
- fzaninotto/faker: ~1.4
- mockery/mockery: 0.9.*
- orchestra/testbench: ~3.4
- phpunit/phpunit: ~6.0
README
Packaged version of the Spatie's Laravel Dashboard. The aim is to allow this handsome dashboard to be pulled into other projects, or customised heavily while keeping the core code isolated.
We will offer this repo to Spatie for them to maintain, so it may not exist for too long here.
Installation
With a new Laravel 5.5 app:
composer require konsulting/spatie-laravel-dashboard
php artisan make:auth
php artisan migrate
- Add a user: perhaps use
php artisan tinker
- The
Spatie\\LaravelDashboard\\Providers\\DashboardServiceProvider
is now auto-registered. - Add the schedule to your console kernel. Add
(new \Spatie\LaravelDashboard\Console\DashboardSchedule($schedule))->handle();
to thehandle
method. - Add your pusher cluster settings to the
config/broadcasting.php
file
'pusher' => [ ... 'options' => [ 'cluster' => 'eu', 'secure' => true, ], ]
- If using google calendar, you need a service account - add the json file with credentials to
storage/app/google-calendar/service-account-credentials.json
- Add the .env items you need from the
stubs/.env.example
for the services you want to use.
For simple use
php artisan vendor:publish --provider=Spatie\\LaravelDashboard\\Providers\\DashboardServiceProvider --tag=basic
- Start your queue listener and setup the Laravel scheduler.
- Open the dashboard in your browser, login and wait for the update events to fill the dashboard.
Simple customisations are possible through the config file (config/dashboard.php
) and the dashboard view (resources/views/vendor/dashboard/dashbooard.blade.php
).
If using any of these routes, you may need to explude them in your VerifyCsrfToken middleware.
protected $except = [ '/webhook/github', '/pusher/authenticate', '/oh-dear-webhooks', ];
To fully customise, it needs more work
You need to be comfortable with Vue and Laravel
-
php artisan vendor:publish --provider=Spatie\\LaravelDashboard\\Providers\\DashboardServiceProvider --tag=advanced
-
add babel.rc and all package.json reqt's (see the packages .babelrc and package.json)
-
npm run prod
to build the necessary files. -
You can override the schedule by using your own
Schedule
class instead ofSpatie\LaravelDashboard\Console\DashboardSchedule($schedule)
. -
You can either add to the Dashboard Update command by listening for the
DashboardUpdated
event, or by creating a new Command set inSpatie\Console\UpdateDashboardCommandSet
License
This project and the Laravel framework are open-sourced software licensed under the MIT license.