Can't edit, forgot the most important detail: If I type http://localhost/remind in my browser, I see the error page. Typing http://localhost/login instead, will work an show me my login page (but this is not shown in the code I posted).
Have you verified your htaccess file is correct?
Have you tried http://localhost/yourlaravelfolder/public/remind?
Route::get('remind', 'RemindersController@showRemind');
looks correct.
jimgwhit said:
Have you verified your htaccess file is correct?
Have you tried http://localhost/yourlaravelfolder/public/remind?Route::get('remind', 'RemindersController@showRemind');
looks correct.
I downloaded laravel with composer and did not touch the *.htaccess file yet. As I said, every other controller/route works.
I don't use homestead, I use WAMP as local development environment. I have set my root dir to MyApp/public. So calling http://localhost/login works fine:
/*
|--------------------------------------------------------------------------
| Routes to User Controller
|--------------------------------------------------------------------------
*/
Route::get('login', 'UserController@showLogin');
public function showLogin()
{
if ((Auth::check()) or (Auth::viaRemember())) {
return Redirect::to('home');
} else {
return View::make('pages.login');
}
}
Works fine.
Okay, I tried something. The route IS working, but calling my views does not.
The fun thing is, I can create 4 different views I created two days ago when calling:
return View::make('pages.enter');
# or
return View::make('pages.home');
# or
return View::make('pages.login');
# or
return View::make('pages.register');
All 4 views will create and show with this command, but I can't call these 2 fews I created yesterday for my reminder:
return View::make('pages.remind');
# or
return View::make('pages.reset');
When I call these, I get the error page.
But all views are in the same directory (views/pages/): http://www.pic-upload.de/view-25419998/Unbenannt.png.html
Any ideas?
Try this:
public function showRemind()
{
echo "made it here";
// return View::make('pages.remind');
}
Also read this post, something could be wrong with the view:
http://laravel.io/forum/11-21-2014-newbe-blank-page-issue?page=1#reply-17336
And it seems that localhost/login is wrong, unless laravel is the only thing you are using. usually wamp will have a htdocs folder. So normally you would have something like:
localhost/whatever you called your laravel folder/login
or
localhost/whatever you called your laravel folder/public/login
In your htacces you could try to add after this line:
RewriteEngine On
add this line:
RewriteBase /your folder name goes here/public/
For example I am playing around with laravel 5, here my htaccess:
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteBase /laravel5/public/
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
And laravel5 folder is under htdocs folder:
htdocs
--laravel5
Echoing works. The function is called. I can even create my login view with this function. But if I want to vall the remind view it is not working. So maybe you are right, it might be the forms. WAMP has a www folder (similar to htdocs). But in my apache config, I set my dir to www/mylaravelproject/public, rewriting is enabled. Calling localhost/login willbring up my view.
I will check my remind and reset form again.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community