laravel blade output for array code example
Example 1: how to print array in laravel blade
@foreach ($watchFolder as $key => $value)
Key: {{ $key }}
Value: {{ $value }}
@endforeach
Example 2: how to print array in laravel blade
class WatchController extends Controller
{
public function index(\Illuminate\Filesystem\Filesystem $filesystem)
{
$files = $filesystem->allFiles($watchFolderPath);
// Your code.
return view('name', ['files' => $files]);
}
}