johnnw

It shows:

Conf {#232 ▼ #fillable: array:19 [▶] #dates: array:2 [▶] #connection: "mysql" #table: null #primaryKey: "id" #keyType: "int" +incrementing: true #with: [] #withCount: [] #perPage: 15 +exists: true +wasRecentlyCreated: false #attributes: array:24 [▶] #original: array:24 [▶] #changes: [] #casts: [] #dateFormat: null #appends: [] #dispatchesEvents: [] #observables: [] #relations: [] #touches: [] +timestamps: true #hidden: [] #visible: [] #guarded: array:1 [▶] }

johnnw

The error appears to be on "Illuminate/View/Compilers/Concerns/CompilesLoops.php" in " $iteratee = trim($matches[1]);"

arthurvillar

The method find() only works with ids, not slugs (even if you specified to use it on the model class).

The only time you are trying to access a property (which the error says it's failing) is on $conf->id, so the problem is with your variable $conf which is null.

You can quickly resolve the issue by doing

$conf = Conf::where('slug', $slug)->get();

// or pass an actual id

$conf = Conf::find($id);

Please sign in or create an account to participate in this conversation.