PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Sun May 31, 2020 2:46 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Tue Dec 01, 2015 2:41 pm 
Offline
Forum Contributor

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

I'm working on an application (legacy code) which is wrapped in laravel 4.2
On a nav bar, upon click I'd like to reach the laravel controller. Things go fine, but until I refresh the page I won't reach to the function.

My code looks like:
Syntax: [ Download ] [ Hide ]
        if(isset( $_SESSION['currentfunc'])){          
                if(substr( $_SESSION['currentfunc'], 0,strlen('illumina')) === 'illumina'){
                        echo App::make('Controllers\illumina\mainIllumina')->route($_SESSION['currentfunc']);
                }
        }
 


in the controller I've:

Syntax: [ Download ] [ Hide ]
        public function route($parameter){
               
                Log::info("yes we are here");
        }
 


How do I fix it?
From controller I'd like user to view xyz page, or do some processing.
Do I need to go for AJAX?

Thanks.


Top
 Profile  
 
PostPosted: Tue Dec 01, 2015 6:23 pm 
Offline
Site Administrator
User avatar

Joined: Wed Aug 25, 2004 7:54 pm
Posts: 13592
Location: New York, NY, US
If you want to reach to a function without refreshing the page, you need to use Ajax. The Ajax call can then return data to generate changes to the page, or return the actual HTML to replace part of the page.

_________________
(#10850)


Top
 Profile  
 
PostPosted: Wed Dec 09, 2015 10:21 am 
Offline
Forum Contributor

Joined: Thu Apr 16, 2015 7:55 am
Posts: 110
Hi Chris,
Thanks for your reply. I got it done. :)


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

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 6 guests


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