Reputation: 461
I am new to Laravel and I have encounter some problems when changing the default page of the project.
I have installed Laravel and try to change the route setting
Route::get("/", function(){return view("welcome");})
to
Route::get("/", function(){return view("home");})
. I have added a simple php page home.blade.php in Resources/views but it couldn't display "home" page.
I have also tried to use Controller approach by adding a HomeController and there is a function called "showHomePage" which will returns view("home") but still no luck.
Are there any setting / configuration is needed ? Thank you
Upvotes: 2
Views: 300
Reputation: 1129
you need to clear the compiled view files after changing the template or any view code. ( no need to use command serve)
php artisan view:clear
or delete all files in storage/framework/views
or you should chmod 777 folder storage and chmod 775 vendor.
Upvotes: 3
Reputation: 461
Thanks for mydo47 suggestion. chmod 777 folder storage and chmod 775 vendor (Apply to all sub-folder recursively) solve the problem.
Upvotes: 0