W
W
wewmega2016-05-16 11:06:53
Laravel
wewmega, 2016-05-16 11:06:53

How to get controller properties in laravel?

in balde I want to get the properties but it gives this error

Undefined property: Illuminate\View\Engines\CompilerEngine::$i (View: C:\xampp7\htdocs\msm\resources\views\estimate\returnView\pickUpAddress.blade.php)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Stanislav Pochepko, 2016-05-16
@DJZT

The View doesn't know anything about your controller and shouldn't. You need to pass data to View.

public controllerMethod(){
///..... logic
return view('your.view', ['key' => $value] );
}

in blade
{{$key}}

E
Eugene, 2016-05-16
@Nc_Soft

view()->share('var', $var)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question