What did you change? You have an error somewhere else in your code. Show us the template you changed, or last code you changed.
Jul 29, 2018
6
Level 2
ERROR: Call to a member function define() on null
Hello, i had this error in Laravel. I was changing a blade template when this occur and now Laravel gives me this error in every page. Any idea?
<?php
use Faker\Generator as Faker;
/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| This directory should contain each of the model factory definitions for
| your application. Factories provide a convenient way to generate new
| model instances for testing / seeding your application's database.
|
*/
$factory->define(App\User::class, function (Faker $faker) { \ <<<---- here it gives me the error
return [
'name' => $faker->name,
'email' => $faker->unique()->safeEmail,
'password' => 'y$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret
'remember_token' => str_random(10),
];
});
Level 67
Reupload everything?
I don't see how the problem could be in the code you're posting. Usually that would only be used if you're seeding your database or something. It's not something you'd normally do in a controller.
Most likely this is going to be a huge pain to track down what's happening. I'd just reupload all of your code if you had a problem when uploading it last time. I'm sure it will take less time than tracking down the cause of this.
1 like
Please or to participate in this conversation.