You should read the laravel docs:
http://laravel.com/docs/routing
Btw, have you worked with any framework before ?
In fact I have developed a very complex Extranet in my laptop but now I want to transcribe it (dont want to upload it) and before I worked with Codeigniter where I developed 12 webs without ever a problem.
I have read all about routing and no answer anyway
and I have read the pdf book of Laravel 392 pages, but that does not answer to the question.
Okay, so change you routes.php to:
Route::get('/public/', array(
'as'=>'home',
'uses'=>'HomeController@showWelcome'
));
(/) should be referring to the base UR but it does not make any difference
I have made countless variations in the app.php file (before config.php file)
like this:
'url' => 'http://mydomain.com/',
http://mydomain.com/public
http://mydomain.com/public/index.php
and no change
It takes me back to mydomain.com and to the list of files shown above, changing the route to /public/ did not make any difference :/
Hello
I have the Vendor directory, look, it is the last one, and when I look in my Code Editor I can see its subdirectories
bin classpreloader composer etc
Wait a minute, do you have your project in the GitHub ? It will be easy to find out your problem
Your application works. But the view
/home/john/public_html/app/views/frontpage.blade.php
has problem, can you show me the content of that file ?
Hi
I dont have it in github, one second about the frontpage.blade.php let me look at it but in anycase I can replace it by a simple file
How about the app/storage/log/laravel.log file ?
I know what you are thinking, if I am making a
@extends('mainlayout')
@section ('content')
@stop
and then something missing in the mainlayout file but no, this frontpage is autonomous, does not extend any layout
Laravel log file, very long :(
Stack trace: #0 /home/john/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1021): Illuminate\Routing\RouteCollection->match(Object(Illuminate\Http\Request)) #1 /home/john/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(989): Illuminate\Routing\Router->findRoute(Object(Illuminate\Http\Request))
OK, last try, what is your PHP version, >= 5.4 ? If that, in your project dir type:
php artisan serve
then visit the htt://localhost:8000/ and tell me what you get.
as far as I recall it is 5.4.28 it is a brand new dedicated server running CENTOS and I have just bought cpanel with the last softaculous version so it has installed me Laravel 4.1.29 and the server version is Apache 2.27 open ssl etc
Route [] not defined. (View: /home/john/public_html/app/views/frontpage.blade.php)
This exception is my only clue for your problem :( . Please give me anything that make it clearer :(
I am trying because I am baffled myself. I have reviewed the protocol
Base url set in the config file: http://mydomain.com/public (I have tried many variations,with index.php etc)
Then the route
Route::get('public/', array(
'as'=>'home',
'uses'=>'HomeController@showWelcome'
));
and the router just like I wrote at the beginning
You can check to see how Laravel has your routes registered:
php artisan routes
It shows a table that says:
URI
GET|HEAD|PUBLIC
NAME ACTION
home HomeController@showWelcome
The Box for domain appears empty
You can read on stackoverflow http://stackoverflow.com/questions/16683046/how-to-install-laravel-4-to-a-web-host-subfolder-without-publicly-exposing-app
If you are using CentOS and Apache. You need to update your httpd.conf file to point to the public folder as the DocumentRoot. This goes at the very bottom of httpd.conf. Update it with your information.
<VirtualHost *:80> DocumentRoot /var/www/html/laravel_folder/public ServerName mydomain.com ServerAlias www.mydomain.com </VirtualHost>
This sounds interesting, thank you >bomberman1990 said:
Route [] not defined. (View: /home/john/public_html/app/views/frontpage.blade.php)
This exception is my only clue for your problem :( . Please give me anything that make it clearer :(
Yes you are right
thank you
========================
KyleGawryluk said:
If you are using CentOS and Apache. You need to update your httpd.conf file to point to the public folder as the DocumentRoot. This goes at the very bottom of httpd.conf. Update it with your information.
<VirtualHost *:80> DocumentRoot /var/www/html/laravel_folder/public ServerName mydomain.com ServerAlias www.mydomain.com </VirtualHost>
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community