I have a home page that is routed and has a blade template. Everything is all fine. But I also have a login page, that I created using the php artisan make:auth. It was all working on when I was using the integrated Laravel server, but I had to move my project to xampp's htdocs folder, to make use of the phpmyadmin database management features. So I copied my project over, typed in the new address (was localhost:8000, now it's http://localhost/laravel52/public/), and it worked. Then I tried http://localhost/laravel52/public/login, where my login form was, and I got routed to localhost/login. And that is not valid. Here is my routes.php file:
Route::get('/', 'HomeController@index');
Route::get('/home', 'HomeController@index');
Route::get('/admin', 'AdminController@index');
Route::auth();
The important lines from AuthController.php
protected $loginPath = '/login';
protected $redirectPath = '/home';
protected $redirectTo = '/home';
And finally my AdminController.php Controller file:
class AdminController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth');
}
public function index() {
return view('admin');
}
}
What am I doing wrong? I tried setting the APP_URL= in the .env file to the current project root e.g. APP_URL=http://localhost/laravel52/public/ But that did not work.
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/25G2R5m
via IFTTT
Aucun commentaire:
Enregistrer un commentaire