
Redirect to another view from controller in laravel
Created at 25-Aug-2021 ,
By samar
Redirect to another view from controller in laravel
Through many examples, we will learn how to resolve the "Redirect to another view from controller in laravel".
You can redirect to two different views from the controller on the basis of condition. If the condition for the return to the specific view is true it will return to the view otherwise it will return to the another view.-
Return to two different view on the basis of if condition
if($conditionTrue){ return view('dashboard'); } return view('home');
If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.
Don't forget to share this article! Help us spread the word by clicking the share button below.
We appreciate your support and are committed to providing you valuable and informative content.
We are thankful for your never ending support.
Random Code Snippet Queries: Laravel
- Delete records with relationship in laravel
- Laravel create default admin user
- How to insert value to additional columns in pivot table in laravel
- Use withCount() to get total number of records with relationship
- Call to a member function pluck() on null
- How to check records exist in loaded relationship in Laravel blade view
- How to restore deleted records in laravel
- How to get file extension from input type file in laravel
- How to create laravel project using composer
- Docker important commands to run laravel application with docker
- Update email with unique validation in laravel
- How to customize or Change validation error messages
- 419 page expired error in Laravel
- How to fill a column automatically while creating records in Laravel
- How to start websocket server in laravel
- Get latest record by created at in Laravel
- Laravel change date format
- Call to a member function pluck() on array
- How to get route name on visit URL in laravel
- How to display validation error in laravel
- Get content from web URL in laravel
- Class 'App\Rules\Hash' not found in Laravel
- Argument 1 passed to App\Http\Controllers\Auth\LoginController::authenticated() must be an instance of App\Http\Controllers\Auth\Request
- Symlink(): No such file or directory
- Create a record if not exist in laravel