what kind of data does laravel send to view from controller code example
Example 1: pass parameter to view laravel
Route::get('/', function () {
return view('greeting', ['name' => 'James']);
});
Example 2: passing data from controller to blade view laravel
@for($i = 1; $i < count($pics); $i++)
<li data-target="#carousel-example-generic" data-slide-to="{{ $i }}"></li>
@endfor