NeoEloquent Undefined property: Illuminate\Database\Query\Builder::$matches - php

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!

Related

Call to undefined function App\Providers\studly_case() after upgrade to Laravel 6.0.x

As I mentioned in the question, I just upgraded the Laravel version of my project from 5.8.* to 6.0.*.
Now I am getting the below error:
In AppServiceProvider.php line 32:
Call to undefined function App\Providers\studly_case()
Is Laravel supposed to throw error in it's own core file ? I was invoking the following command when I got this error, so I suppose this happens with any artisan command:
php artisan list
I saw in docs, that the new function is Str::studly from Str class file. Is it ok to change in the AppServiceProvider.php ?
Referring to the Laravel 6.x docs, I just discovered that the function for converting the string's current case to studly case is moved to Illuminate\Support\Str class, and named as studly().
So I added that dependency and then replaced the studly_case() to Str::studly() in AppServiceProvider.php, and then was able to run the artisan commands just like before.
I wasn't sure that changing AppServiceProvider.php is standard way or not, but it did worked so I am posting the answer here, that way it'll help anyone else facing the same issue.

Laravel - Call to undefined method Illuminate\Console\GeneratorCommand::handle

I'm new to Laravel. and I was trying to create a new CRUD from terminal with this command:
$ php artisan panel:crud gallery
But, it gave me the following error that i have mention below. I've searched for it on google. but I didn't find anything that could help to solve this.
[ ServerFireTeam Panel Crud Generator ]
[Symfony\Component\Debug\Exception\FatalThrowableError]
Call to undefined method Illuminate\Console\GeneratorCommand::handle()
Can anybody put me on the right direction?
You need v5.5 of laravel to run laravelpanel 1.7
for laravelpanel 1.6 (which work with laravel v5.4) you need to register PanelServiceProvider
providers' => array(
Serverfireteam\Panel\PanelServiceProvider::class
)
and run
php artisan panel:install
for more info visit
http://laravelpanel.com/docs/master/automatic-installation

Laravel 5.3 - When is session store started?

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.

Laravel 5.0.34 database seeding error with tinker

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

How can I use Cache during application bootstrapping?

I am migrating a Laravel 4.2 application to Laravel 5.1.
During bootstrap, when loading the mail configuration file (config/mail.php), I want to read my SMTP configuration from DB and cache it.
In order to do that I use an Eloquent model class, in which I use the Cache facade's remember() function to get the data I need.
It used to work in 4.2, but after switching to 5.1, I get the following error message:
Call to a member function remember() on a non-object
This happens after I put the following line at the top of the class:
use Illuminate\Support\Facades\Cache;
Without that line I got a Class 'Cache' not found error message.
Any idea what am I missing? Is this even possible in 5.1?
Thanks a lot!

Categories