Tag : Current Page


Codeigniter - How to get current url in controller or view ?

Sometimes, we need to get current URL path in your controller file or view file. So, we can get simply using "url" helper. Codeigniter provide url helper library that way we can get existing page url or base url etc. current_url() through we can get current url in your Codeigniter application. But, you should load "url" helper before use current_url(). you can load url helper as bellow: <pre> $this->load->helper('url'); </pre> In bellow example, you can see code how can i get current url in your controller file. So, let's see. <pre class="prettyprint lang-php"> $this->load->helper('url'); <b.....

By Hardik Savani | August 2, 2016 | | 905 Viewer | Category : Codeigniter
READ MORE

Laravel - How to get current URL in controller or view?

We always require to get current URL path when work on ajax pagination or something, at that we require to get current page URL on Controller or blade file. So, you can get current url easily. Laravel provide URL facade that way we can get current URL anywhere, as bellow you can see i use current() of URL facade. URL facade through you can get your current page url from every where. So you can check your current url this way: <strong>Example:</strong> <pre class="prettyprint lang-php"> $currentURL = URL::current(); dd($currentURL); </pre>

By Hardik Savani | July 20, 2016 | | 2304 Viewer | Category : Laravel
READ MORE

How to get current page url in PHP?

Whenever you need to get actual page url in Native PHP then you can do using this post. I give you the example that way you can get easily current URL in PHP. following PHP code through you can get: <strong>Example:</strong> <pre class="prettyprint lang-php"> $currentLink = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; print_r($currentLink); </pre>

By Hardik Savani | May 2, 2016 | | 743 Viewer | Category : PHP
READ MORE

    Laravel Jquery Ajax Pagination Example From Scratch

    Laravel Jquery Ajax Pagination Example From Scratch

    Open Post

    Laravel - How to make subquery in select statement?

    Laravel - How to make subquery in select statement?

    Open Post

    How to send mail using zoho smtp server in PHP Laravel?

    How to send mail using zoho smtp server in PHP Laravel?

    Open Post

    Laravel 5 login with Linkedin using Socialite Package

    Laravel 5 login with Linkedin using Socialite Package

    Open Post

    How to use elasticsearch from scratch in laravel 5?

    How to use elasticsearch from scratch in laravel 5?

    Open Post

    Laravel 5 create custom artisan command with example

    Laravel 5 create custom artisan command with example

    Open Post