In a fresh laravel project, I am creating an authentication system using
php artisan make:auth
Then, I rename the following file:
welcome.blade.php to welcome1.blade.php
and replace that one with a new file carrying the same name:
welcome.blade.php
Then I refresh the page, but it still shows the old page view in the browser. Even after I have changed the text in welcome1.blade.php, the view hasn't changed. How do I change the blade pages created during the 'make:auth' command?
Try clearing your application cache by running php artisan cache:clear in your terminal.
If you're using WelcomeController you need to change the call to the view. If not, you need to change your route file to match.
public function index() {
return view('welcome1');
}
If you are running the view from Routes
Route::get('/', function () {
return view('welcome');
});
Make sure that the view you loading is actually called welcome.blade.php
or if you want to load welcome welcome1.blade.php
If you are running this through Controllers
Route::get('/', 'HomeController@index');
Then Controller :
//to return welcome
public function index(){
return view('welcome');
}
//to return welcome1
public function index(){
return view('welcome1');
}