PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Mon Sep 23, 2019 5:19 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: Wed Oct 28, 2015 2:53 pm 
Offline
Forum Contributor

Joined: Thu Apr 16, 2015 7:55 am
Posts: 110


Top
 Profile  
 
PostPosted: Wed Oct 28, 2015 3:10 pm 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6425
Location: Montreal, Canada
What about if you use view() in your controller method rather than View::make? Anything in your error logs?

_________________


Top
 Profile  
 
PostPosted: Wed Oct 28, 2015 3:16 pm 
Offline
Forum Contributor

Joined: Thu Apr 16, 2015 7:55 am
Posts: 110


Last edited by publicGenome on Wed Oct 28, 2015 3:18 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Wed Oct 28, 2015 3:17 pm 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6425
Location: Montreal, Canada
Start by fixing the syntax error in your routes file, then we can progress from there.

_________________


Top
 Profile  
 
PostPosted: Wed Oct 28, 2015 3:23 pm 
Offline
Forum Contributor

Joined: Thu Apr 16, 2015 7:55 am
Posts: 110


Top
 Profile  
 
PostPosted: Wed Oct 28, 2015 3:30 pm 
Offline
Forum Contributor

Joined: Thu Apr 16, 2015 7:55 am
Posts: 110
Update:

I got it working.

I had to type public to get to index/home page of laravel. Thus, initially, I moved index.php from public to root folder, and skipped typing public in the URL.

With changes as:
Syntax: [ Download ] [ Hide ]
require __DIR__.'/../bootstrap/autoload.php'; //this is changed when the index file moved
//require __DIR__.'/bootstrap/autoload.php';


$app = require_once __DIR__.'/../bootstrap/app.php'; //this is changed when the index file moved
//$app = require_once __DIR__.'/bootstrap/app.php';

 

After this I didn't have to type public in the URL.
When I moved this index.php back to its original location routes.php is taking me to the about page. Route seems to work.

But every time I've to add public to get this working, to avoid this, I had moved the index files. I found this option to edit index file.
I think I should go with editing of vhosts that would be much better, without disrupting the entire set up.

Thanks.


Top
 Profile  
 
PostPosted: Wed Oct 28, 2015 3:33 pm 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6425
Location: Montreal, Canada
You should set your document root to the public directory. You shouldn't need /public/ in your URI

_________________


Top
 Profile  
 
PostPosted: Wed Oct 28, 2015 3:36 pm 
Offline
Forum Contributor

Joined: Thu Apr 16, 2015 7:55 am
Posts: 110


Top
 Profile  
 
PostPosted: Wed Oct 28, 2015 4:42 pm 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6425
Location: Montreal, Canada
I create a virtual host for each project and specify the document root in the vhost definition.

_________________


Top
 Profile  
 
PostPosted: Wed Oct 28, 2015 4:59 pm 
Offline
Forum Contributor

Joined: Thu Apr 16, 2015 7:55 am
Posts: 110


Top
 Profile  
 
PostPosted: Mon Feb 08, 2016 7:41 am 
Offline
Forum Newbie

Joined: Thu Feb 04, 2016 2:19 am
Posts: 7
Hey,
Change your config to the following:

<Directory /var/www/laravel/public>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>


Top
 Profile  
 
PostPosted: Mon Feb 08, 2016 8:15 am 
Offline
Forum Contributor

Joined: Thu Apr 16, 2015 7:55 am
Posts: 110


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group