Search code examples
laravellaravel-5laravel-views

Laravel 5.8 View [admin.home] not found on live site


my laravel site is working fine on localhost but not working on live domain after i upload my site on hosting.

I cleared my cache from online, check my routes again but nothing change.

MY ROUTES:

        Route::group(['prefix' => 'admin', 'namespace' => 'Admin'], function ()         {
         Route::get('/', 'HomeController@home')->name('admin.home');
   //    Route::resource('/', 'DashboardController');
         Route::resource('school_account', 'SchoolAccountController');
         Route::get('school_account/{school_account}/update_status', 'SchoolAccountController@update_status')->name('school_account.update_status');
         Route::resource('package', 'PackageController');
         Route::resource('license', 'LicenseController');
         Route::resource('feature', 'FeatureController');
     });

my Controller Class

 <?php

 namespace App\Http\Controllers\Admin;

 use Illuminate\Http\Request;
 use App\Http\Controllers\Controller;

 class HomeController extends Controller
 {
     public function home()
     {
         return view('admin.home');
     }
 }

directory of blades:


Solution

  • I suppose you are developing on a Windows machine and host your website on a Linux machine?

    On Windows, folders are case insensitive, meaning that Admin and admin are the same folder. However, on Linux, paths are case sensitive and those paths are not the same.

    Rename your views/Admin folder to views/admin and all should be fixed.