/    Sign up×
Community /Pin to ProfileBookmark

routing in laravel 4

Hi There,

I’m new to web development. I’ve been passed over a mess of an application. I’m learning in bits and pieces.
Legacy code is wrapped in a Laravel framework now. No team member, or help from any other possible way. Laravel version 4.2

Here’s what I’m trying to do in my routes.php file

[code=php]
Route::get(‘Illumina’, function() {
return View::make(‘Illumina’);
echo “telephone </br>”;
//return public_path(‘Illumina.php’);
});

[/code]

I’ve Illumina.php in app->views

However, when I try to reach to Illumina I fail to pass through to the page.

in browser:

[url]http://localhost/pims_latest/public/Illumina[/url]
I get error as:

[QUOTE]

The requested URL /pims_latest/public/Illumina was not found on this server.

[/QUOTE]

How do I fix this?
In laravel 5, I’m able to get to the page without any problem.

Kindly help and enlighten. ?

to post a comment
PHP

7 Comments(s)

Copy linkTweet thisAlerts:
@NogDogNov 18.2015 — I don't think you want "public/" in the URI? (That's usually for direct access to static files like CSS and JS stuff, IIRC).
Copy linkTweet thisAlerts:
@publicGenomeauthorNov 18.2015 — I don't think you want "public/" in the URI? (That's usually for direct access to static files like CSS and JS stuff, IIRC).[/QUOTE]
Hi NogDog,

Thanks for your attention and quick reply to my post.

If I remove public, and

paste in browser as:

http://localhost/pims_latest/Illumina

The requested URL /pims_latest/Illumina was not found on this server.
[/QUOTE]

This wouldn't allow either.
Copy linkTweet thisAlerts:
@publicGenomeauthorNov 18.2015 — Routing works well in Laravel 5 on my local:

[CODE]

Route::get('Illumina', function(){

return View::make('home');

});
[/CODE]

In my browser I write:


http://localhost/webdevelop/public/Illumina
[/QUOTE]



I'm navigated to the home page.
Copy linkTweet thisAlerts:
@NogDogNov 18.2015 — Oh...wait...so "Illumina" is the base Laravel directory, and you just have things set up (in theory) on your local development host to hit it in <web_root>/webdevelop/public/ ? I.e.: I'm wondering if you're even hitting the Laravel code and routing, versus it's really a web server config issue?
Copy linkTweet thisAlerts:
@publicGenomeauthorNov 18.2015 — Oh...wait...so "Illumina" is the base Laravel directory, and you just have things set up (in theory) on your local development host to hit it in <web_root>/webdevelop/public/ ? I.e.: I'm wondering if you're even hitting the Laravel code and routing, versus it's really a web server config issue?[/QUOTE]

Hi,

Illumina is a .php file
Copy linkTweet thisAlerts:
@NogDogNov 18.2015 — Okay, so is "plms_latest" the base Laravel directory? If so, does the .htaccess file there recognize "public" as something it will route to directly? If not, then the route would need to be "public/illumina" -- I think: I've only worked a bit with L5, and not at all with L4.
Copy linkTweet thisAlerts:
@publicGenomeauthorNov 18.2015 — Yes, plms_latest is the laravel base directory.

I don't find .htaccess file in public folder.

To fix this public thing in the browser I'm fixing vhosts. I'm close to it, but having issues with it.

I created thread for it:

http://www.webdeveloper.com/forum/newreply.php?do=postreply&t=350923

Thanks again for your reply and attention to my query.
×

Success!

Help @publicGenome spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...