How to get the properties of the controller in laravel?

in balde want to get 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)
July 9th 19 at 14:00
2 answers
July 9th 19 at 14:02
View knows nothing about your controller shouldn't know. You need to pass data to View.
public controllerMethod(){
///..... logic
return view('your.view', ['key' => $value] );

in Blade
July 9th 19 at 14:04
view()->share('var', $var)

Find more questions by tags LaravelPHP