Tag : URL



Laravel 5 Redirect to URL using redirect() helper

In this tutorial, i am going to tell you how to redirect user one page to another page from controller method. we normally use <strong class="path">redirect()</strong> helper method for redirect user in controller. We can simply use redirect() helper in Laravel 5.0, Laravel 5.1, Laravel 5.2 and Laravel 5.3. Laravel 5 version provided redirect(). there are several way to do redirect URL in Laravel. In this post i am going to give you all the way to redirect URL with parameters. There are several methods through we can redirect URL in Laravel 5 as listed bellow: <strong>1) Redirect to URL</st.....

By Hardik Savani | October 19, 2016 | | 8889 Viewer | Category : Laravel
READ MORE

How to remove # from URL in AngularJS?

If you work on AngularJS web application using angular route then you notice one thing. If you click on any hyper links it makes like as bellow: <pre> http://localhost:8000/# http://localhost:8000/#/items http://localhost:8000/#/users </pre> I mean always "#" will be there, But when we live this web application then it should delete "#" from URL, because it makes issue when we share link on facebook or etc. But should look likes: <pre> http://localhost:8000/ http://localhost:8000/items http://localhost:8000/users </pre> But we can remove easily using "$locationProvider.html5Mode(true);". Yo.....

By Hardik Savani | September 18, 2016 | | 4223 Viewer | Category : AngularJS
READ MORE

How to get current url with query string in codeigniter?

If you require to get current URL with parameters in your codeigniter project then you can get easily using "url" helper. Codeigniter provide url helper library that way we can get existing page url or base url etc. you can also get only parameters without URL using "input" as like bellow. <pre> $parameters = $this->input->get(); </pre> But, we are getting full path using "url" helper and $_SERVER variable. So, you can see how to get full path using both as bellow: <strong>Example:</strong> <pre class="prettyprint lang-php"> $this->load->helper('url'); <br/> $currentURL = current_url(); $pa.....

By Hardik Savani | August 29, 2016 | | 11941 Viewer | Category : Codeigniter
READ MORE

How to get current url with parameters in Laravel 5?

We sometimes require to get full url path with query string parameters that way we can perform on it. So we can get current url with also all parameter using several method of laravel. There are several option to get full url with query string as listed bellow: <ul> <li><strong>URL Facade</strong></li> <li><strong>Request Facade</strong></li> <li><strong>$request Object</strong></li> </ul> I give you three way to get full path with parameters, so you can see as bellow: <strong>Example 1:</strong> <pre class="prettyprint lang-php"> public function index() { $fullURL = \URL::full(); p.....

By Hardik Savani | August 8, 2016 | | 6775 Viewer | Category : Laravel
READ MORE

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 | | 5240 Viewer | Category : Codeigniter
READ MORE

How to get current url path example in Jquery?

Sometimes we need to get current URL in jquery file, we can get current URL or path of our current page in javascript using "window.location". In this post i give you three way to get current url in your js file as there are bellow listed: <strong>1.window.location.href</strong> <strong>2.$(location).attr("href")</strong> <strong>3.window.location</strong> Ok, so you can check bellow example code and run in your system. <strong>Example:</strong> <pre class="prettyprint lang-html"> <html lang="en"> <br/> <head> <title>JQuery - get current URL Example</title> &l.....

By Hardik Savani | July 27, 2016 | | 4485 Viewer | Category : Javascript jQuery
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 | | 15779 Viewer | Category : Laravel
READ MORE

How to get folder path from file path in PHP?

Sometimes, we require to get directory path from Image path or file url in our PHP website or any PHP framework website at that time we can get folder name using php pre-define function dirname. If you ever use this function then you can see as bellow example how it's works. I have one image url like, i want to just get folder path then you can get folder path like this way : <strong>Example:</strong> <pre class="prettyprint lang-php"> dirname('http://localhost:8000/upload/images/test.jpg'); </pre>

By Hardik Savani | July 4, 2016 | | 968 Viewer | Category : PHP
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 | | 2062 Viewer | Category : PHP
READ MORE

How to check if string is URL or not in PHP?

Sometimes, we require to check the given argument or string is URL or not, as specially i did need to check image column is url or not like i give you example how to do this. If you also need to do this then you can use filter_var(). <strong>Example:</strong> <pre class="prettyprint lang-php"> if(filter_var($imagePath, FILTER_VALIDATE_URL) === FALSE){ print_r("Not valide URL"); }else{ print_r("valide URL"); } </pre>

By Hardik Savani | April 18, 2016 | | 2173 Viewer | Category : PHP
READ MORE

    Laravel 5.3 - whereDate(), whereMonth(), whereDay() and whereYear() examples.

    Laravel 5.3 - whereDate(), whereMonth(), whereDay() and whereYear() examples.

    Open Post

    Laravel 5.2 - User ACL Roles and Permissions with Middleware using entrust from Scratch Tutorial

    Laravel 5.2 - User ACL Roles and Permissions with Middleware using entrust from Scratch Tutorial

    Open Post

    Solved - opencart this merchant is not enabled for auth/settle

    Solved - opencart this merchant is not enabled for auth/settle

    Open Post

    AngularJS - update bind ng-model input value from Jquery Code

    AngularJS - update bind ng-model input value from Jquery Code

    Open Post

    Solved - Access Not Configured. Google+ API (truncated...) on google console developer

    Solved - Access Not Configured. Google+ API (truncated...) on google console developer

    Open Post

    Laravel 5 - Simple user access control using Middleware

    Laravel 5 - Simple user access control using Middleware

    Open Post