i am making an application and i want that pass error parameters to master view use within partial blade called error.blade.php.
i am checking some variable in controller and if anything occur error i added it to error array as below :
$error[] = 'error 1';
and i want to pass this to partial blade view called error.blade.php and render it but how can i do this ?
this array could be empty or not.
how can i pass this array to master layout before render ?
i use this error array every controller.
please help me