How to change redirect page url for login

I have a project, its build by an other developer. Now the owner hired me to do small change in the project. I need your help guys, i added a new page its name is lockscreen, it works same as signout. Jus the page will be change when it will redirect. I tried but when i try to change this code" return redirect('/')->with(['message' => 'Logout Successfully']);" to "return redirect('lockscreen')->with(['message' => 'Locked ScreenSuccessfully']);" so i face lot of error, which i couldn't solve and didn't understand kindly help me to getride from it.

owsoultions
owsoultions
  • 6 days ago

create route url for lockscreen and attached with lockscreen name

route.php

Route::get('/lockscreen', function ()    {
    return View('lockscreen_page_path');
})->name('lockscreen');