Closed coding-sunshine closed 6 years ago
yes, when my APP_ENV=production
/totem/tasks gives 404
This is documented in the readme (https://github.com/codestudiohq/laravel-totem#web-dashboard). You have to overwrite the default auth feature as it only checks that APP_ENV
is local.
Aah ok, I was confused a bit as I thought there is a way to do it without adding anything to the App service provider, What I was doing is passing a comma-separated middlewares 'web,auth' from my env and changed following lines on totem.php config file
'web' => [ 'middleware' => explode(',', env('TOTEM_WEB_MIDDLEWARE', 'web,auth')), ],
But I will add the descirebed in the code.
But just in-case if you think this can be a good feature I can create a pull request for the same.
Thanks.
I was going to chime in on this. It was very easy. I use Laravel Spark, and wanted it to work for only the "developers" email addresses. Here's how I did it:
AppServiceProvider.php add:
use Illuminate\Support\Facades\Auth;
use Laravel\Spark\Spark;
Then in the boot()
method add in:
Totem::auth(function($request) {
return Spark::developer(Auth::user()->email);
});
Do you mean accessing
/totem/tasks
? Are you having an issue?