You can't have return view('home').redirect('/about');. It is either return view('home'); or return redirect('/about');.
Issues on deploying Laravel project manually (shared hosting)
Hi there, my question may seem dumb but I was following this video tutorial on deploying my project via FTP just to begin somewhere. https://www.youtube.com/watch?v=6g8G3YQtQt4
Everything worked so far, and when I navigate to my site, it is set up and rendered BUT only for the very first index page. Whenever I click on a navigation link to trigger a route I get an Internal Server Error.
Tested with redirecting immediately which also fails with Internal Server Error
// web.php
Route::get('/', function () {
return view('home').redirect('/about');
/* also works, but corrected to
return redirect('/about');
as commented below */
});
Applying another view directly works for the main route but still fails when clicking another navigation link
// web.php
Route::get('/', function () {
return view('about');
});
I edited and reuploaded the remote variant of public/index.php as described but with a slightly different path at vendor (this should be ok?)
require __DIR__.'/../mysite/vendor/autoload.php';
$app = require_once __DIR__.'/../mysite/bootstrap/app.php';
Also the remote .env is updated with DB settings, APP_DEBUG is set to false and APP_ENV to production.
I am surely missing something important. Any suggestions?
Please or to participate in this conversation.