vendredi 21 décembre 2018

i need based on my domain names i need to separate the view folder

i need based on my domain names i need to separate the view folder,so i have created ModifyViewFolder class file in middleware and also registered in kernel.php but its not working properly dont know how to check working or not.and also please verify my kernel.php file in this i dont know register.

use Closure;
use Illuminate\View\FileViewFinder;
use Illuminate\Support\Facades\View;

class ModifyViewFolder
{

  public function handle($request, Closure $next)
  {
      $finder = new FileViewFinder(app()['files'], [
        app_path('../resources/views/' . $request->server->get('HTTP_HOST')),
        app_path('../resources/views/'),

      ]);
      View::setFinder($finder);

      return $next($request);
  }

}

'View'=> \App\Http\Middleware\ModifyViewFolder::class,



from Newest questions tagged laravel-5 - Stack Overflow http://bit.ly/2SbK25K
via IFTTT

Aucun commentaire:

Enregistrer un commentaire