I'm busy learning laravel from a book for laravel 5.2.
I need to change some things because I'm using laravel 5.3.6 and I'm failing with errors.
I'm trying to create a custom exception when an admin user is trying to go to mysite/admin but the user is not active.
My code and errors: http://laravel.io/bin/PX5oP
Can someone please help?
Ok, changed my code in the admin middleware to this:
throw new NoActiveAccountException;
That solved the problem.
Related
I am new to Lumen so I just downloaded and installed a fresh lumen setup but unfortunately as soon as I hit postman it sends me above error. I have read many posts all says to use isset() i did so but still error persists therefore i request to help me.
Composer update also does not work.
Thanks!
It seems to be an issue between your version of PHP and Lumen 5.*
I found something here https://github.com/DarkaOnLine/SwaggerLume/issues/82
This worked for me
// in bootstrap/app.php
$app->configure('view');
I really don't like the new exception screen in laravel 6. Is there a way to switch it back to the one from 5.8?
Whoops is the old error handler, try to install it and register a new handler, there is one example here: How can I register custom error handler in laravel 5?
Find instructions how to install and use whoops here https://github.com/filp/whoops
PS: just be careful, this handler should be executes only on development environment
New installation of Laravel - tried to reinstall and run composer update - same issue.
Laravel api project is returning randomly "Method Illuminate\Support\Carbon::getTimestamp does not exist." after ajax call from axios in separate vue.js client side project. This does not happen for every request. I will greatly appreciate any help.
I am experiencing the same problem, and simple "composer update" after some time should fix this, as Carbon breaks Laravel compatibility.
i have installed the chat package:
https://github.com/dazzz1er/confer
Unfortunately i get an error when i try to publish it. Here is the error:
[Symfony\Component\Debug\Exception\FatalErrorException]
Call to undefined method Illuminate\Support\Facades\View::composer()
Thanks !
As correctly pointed out by #curious_coder confer is not compatible with Laravel 5.2 yet. Please keep an on the open Laravel 5.2 issue on Github and/or ask the author of this package for updates.
I am using laravel 5.0. I am using Entrust for user permissions.
When I try to do the following function
Entrust::can('customers-views')
I am getting error like this. What is the reason for this. How can I solve this?
Class 'App\Http\Controllers\Entrust' not found
Can I use Entrust:can function in controller?
Can you try doing
\Entrust::can('customers-views')
or add the use path\to\Entrust line at the top of your file.