Support the ongoing development of Laravel.io →
Configuration
Last updated 2 years ago.
0

You should read the laravel docs:

http://laravel.com/docs/routing

Btw, have you worked with any framework before ?

Last updated 2 years ago.
0

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.

Last updated 2 years ago.
0

Okay, so change you routes.php to:

Route::get('/public/', array(
    'as'=>'home',
    'uses'=>'HomeController@showWelcome'
));
Last updated 2 years ago.
0

(/) 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

Last updated 2 years ago.
0

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 :/

Last updated 2 years ago.
0

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

Last updated 2 years ago.
0

Wait a minute, do you have your project in the GitHub ? It will be easy to find out your problem

Last updated 2 years ago.
0

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 ?

Last updated 2 years ago.
0

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

Last updated 2 years ago.
0

How about the app/storage/log/laravel.log file ?

Last updated 2 years ago.
0

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

Last updated 2 years ago.
0

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))

Last updated 2 years ago.
0

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.

Last updated 2 years ago.
0

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

Last updated 2 years ago.
0
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 :(

Last updated 2 years ago.
0

I am trying because I am baffled myself. I have reviewed the protocol

  1. Base url set in the config file: http://mydomain.com/public (I have tried many variations,with index.php etc)

  2. Then the route

Route::get('public/', array(
    'as'=>'home',
    'uses'=>'HomeController@showWelcome'
    
));


and the router just like I wrote at the beginning
Last updated 2 years ago.
0

You can check to see how Laravel has your routes registered:

php artisan routes
Last updated 2 years ago.
0

ok i ll do that, one second

Last updated 2 years ago.
0

It shows a table that says:

URI
GET|HEAD|PUBLIC

NAME ACTION

home HomeController@showWelcome

The Box for domain appears empty

Last updated 2 years ago.
0

This sounds interesting, thank you

Last updated 2 years ago.
0

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>

Last updated 2 years ago.
0

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 :(

Last updated 2 years ago.
0

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>

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.