I started a new project in laravel 5.3 (previously used laravel 5.2). So now in the constructor of Controller.php when I run this line (which I did in 5.2 many times), I get the error:
$this->SESS = \Request::session()->all();
//output = Session store not set on request
Can someone tell me whats wrong?
Thanks a lot.
Related
I have a running app written on Laravel 5.7. I tried to change the record in composer.json to match "5.8.*" and ran composer update. On my local (win10/WAMP) machine it went fine, but on the staging server (Debian 9/nginx) the update command changed the vendor contents and failed at the end.
Since then anything I do with the app on the server I get this error and I can't find any information anywhere.
Call to undefined method Illuminate\Routing\RouteFileRegistrar::get()
And this is the line that fails:
$this->get('login', 'Auth\LoginController#showLoginForm')->name('login');
Thanks in advance!
remove "$this" from your routes and use "Route::"
It is a problem with the routes. Mainly, you get this problem when you are using routes with resource or resources. Make sure you do not have any problem in routes by using the command:
#php artisan route:list
If you are getting any problem while route listing please fix it.
I solved this problem in Laravel 5.8 by fixing routes.
Hope this will help.
Since I've upgraded to Laravel version 5.6 from Laravel version 5.5 my Logger doesn't work properly anymore.
At first I got the following error stack :
laravel.EMERGENCY: Unable to create configured logger. Using emergency logger. {"exception":"[object] (InvalidArgumentException(code: 0): Log [] is not defined. at /home/vagrant/Code/grotesmurf/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:181)
which was solved by simply adding the new config/logging.php file that is provided by Laravel 5.6.
But now I'm getting no output from the Logger! I'm simply running \Log::info('hello!') as a tinker command, but it doesn't generate any log output anymore (same for scripts calling the \Log() method).
I've tried different LOG_CHANNEL settings (daily, single, stack), but none of these work.
Hope anyone has ran into this error already and is able to provide me with some suggestions. I have followed the upgrade guide and it doesn't help unfortunately.
Thanks in advance.
P.S. I'm running php version 7.1 & am on ubuntu.
P.P.S. I have cleared all cached config using artisan.
Well I have found the actual problem, we use an adjusted storage_path() method in our application and the new Logger is now using the storage_path() method to generate its path - this caused the log file to be created in a different directory than storage/logs.
i had the same issue, deleting the files in bootstrap/cache solved it.
I'm new to Neo4J and Laravel combined. I was trying out the Vinelab\NeoEloquent library to have a wrapper for Eloquent. Now if i try the default laravel auth code it gives me the following error: Undefined property: Illuminate\Database\Query\Builder::$matches.
I haven't changed anything but i was wondering if someone with experience could help me out? Do i need to change something? Registration works. It created the :User node fine. it also gives an error there: Call to a member function lastInsertId() on null.
Please note i use unedited Laravel authentication using the artisan make:auth function. As of writing this I'm using the latest version of Laravel (5.5) and the Vinelab\neoEloquent ^1.4.4 version.
Thanks in advance!
I am following this laracast tutorial and as I key in this command in tinker:
factory('App\Flyer')->make();
I get this error:
PHP Fatal error: Call to undefined function factory() in eval()'d cod1
My php version locally installed is 5.4.38
So how do I get rid of this error?
PS: I want to avoid upgrading laravel at this stage as it would require me to update my php as well. So looking for some other workaround.
Model factories were added in Laravel 5.1 so it's obvious it won't work in Laravel 5.0.*
Reference: https://laravel.com/docs/5.2/releases#laravel-5.1
Today I decided to upgrade my app from Laravel 5.0 to 5.1. But while upgrading, I am facing the following issue:
Catchable fatal error: Argument 1 passed to Illuminate\Config\Repository::__construct() must be of the type array, integer given, called in /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php on line 32 and defined in /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Config/Repository.php on line 23
Please help me. I need to get my app up and running once again. Thank You.
I was facing the same error, and the issue was:
I created manually the files compiled.php, routes.php, config.php, and services.json inside bootstrap/cache folder, but those files do not need to exist, they will be generated by Laravel application.
https://github.com/laravel/laravel/tree/master/bootstrap/cache
del storage/bootstrap/cache/[files], this resovle my problem