Как печатать массив в Laravel Blade
@php
var_dump($arr);
@endphp
Dev
@php
var_dump($arr);
@endphp
echo implode("\n",$array);
echo implode("\n",array_collapse($array));
@foreach ($watchFolder as $key => $value)
Key: {{ $key }}
Value: {{ $value }}
@endforeach
<?php dd($array); ?>
@foreach ($watchFolder as $w)
{{ $w->name }}
@endforeach
class WatchController extends Controller
{
public function index(\Illuminate\Filesystem\Filesystem $filesystem)
{
$files = $filesystem->allFiles($watchFolderPath);
// Your code.
return view('name', ['files' => $files]);
}
}