Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

gust's avatar
Level 1

Laravel giving View Not found ErrorException in compiled.php

Quiz app, laravel 5.2,Mac Os I made a new view for the results of a search form but it's not being found, I get

    ErrorException in compiled.php line 14475:
View [view] not found. (View: /Users/...path.../resources/views/pages/search.blade.php)

tried

   composer dump-autoload
   php artisan optimize —force
   php artisan config:cache
   php artisan route:cache
   php artisan view:clear
    Route::get('/search','PagesController@search')->name('search');

The route appears with the name search in php artisan route:list And the other routes are working in the PagesController(home,index etc) except

  public function search(){

    return view('pages.search');
}

I'm not sure what else to try

0 likes
3 replies
freel's avatar

hi,

do u have file search.blade.php in views/pages ???

gust's avatar
Level 1

Weird I made another blade file inside another directory thats inside views (views/admin) and it worked and now made a view inside pages and it worked and renamed search.blade.php to something else and it worked and renamed it back to search.blade.php and it works now.

Please or to participate in this conversation.