Tag : Base URL


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 | | 1969 Viewer | Category : AngularJS
READ MORE

How to get filename without extension in PHP?

If you need to get just filename from url withour file extension then you can get that using basename() php function. In bellow example i give you how to get image name without extension. first we need to get extension of given filename url and then basename() through we can remove that extension like as i did bellow: <strong>Example:</strong> <pre class="prettyprint lang-php"> $imagePath = "/home/hd/html/test.jpg"; $ext = pathinfo($imagePath, PATHINFO_EXTENSION); <br/> $file = basename($imagePath,".".$ext); print_r($file); </pre>

By Hardik Savani | May 26, 2016 | | 957 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 | | 1014 Viewer | Category : PHP
READ MORE

How to get site URL in Laravel 5?

Here is quick post, which can help you to get base url or home page url of your laravel application. I think many times we need to get site URL for something share or link, so you can get that using url helper and URL facade. Both way are same you can use that anywhere i mean in controller or view. so let's see. <strong>Example:</strong> <pre class="prettyprint lang-php"> $url = URL::to("/"); print_r($url); <br/> $url2 = url('/'); print_r($url2); </pre>

By Hardik Savani | April 11, 2016 | | 4951 Viewer | Category : Laravel
READ MORE

    Laravel 5 - create quick backend admin panel tutorial

    Laravel 5 - create quick backend admin panel tutorial

    Open Post

    Laravel 5 - Image Upload and Resize Example using Intervention Image Package

    Laravel 5 - Image Upload and Resize Example using Intervention Image Package

    Open Post

    Bootstrap - Show/Hide(toggle) Password input field using bootstrap-show-password.js Plugin

    Bootstrap - Show/Hide(toggle) Password input field using bootstrap-show-password.js Plugin

    Open Post

    Laravel Jquery Ajax Pagination Example From Scratch

    Laravel Jquery Ajax Pagination Example From Scratch

    Open Post

    Laravel 5 - Multiple Images Uploading using dropzone.js example with demo

    Laravel 5 - Multiple Images Uploading using dropzone.js example with demo

    Open Post

    Laravel 5 dynamic autocomplete search using select2 JS Ajax - Part 1

    Laravel 5 dynamic autocomplete search using select2 JS Ajax - Part 1

    Open Post