Tag : helper


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

How to remove key from array in Laravel 5?

Sometimes, we require to delete specific key from array like we have password and confirm-password field but we don't require to store confirm-password field we have to drop that key from input array, At that time we always use unset() function of PHP pre-define. But if you work on laravel then you can array helper function. we can remove multiple key from variable using <strong class="path">array_except()</strong> of Laravel pre-define function. In bellow example you can understand very well. <strong>Example:</strong> <pre class="prettyprint lang-php"> $myArray = ['name'=>'HD','email'=>'te.....

By Hardik Savani | July 7, 2016 | | 948 Viewer | Category : Laravel
READ MORE

How to generate slug using str_slug() helper in Laravel 5?

Generally we require to create slug when we are for front application in laravel, i mean like shopping website, social website because we should have good slug URL for post. So, Laravel provides several string helper like str_limit, str_plural, str_finish, str_singular etc and also str_slug(). str_slug() through we can make proper slug like remove space, remove special character etc. that way it also good for SEO friendly URL. you can see i give syntax and example of str_slug() helper. <strong>Syntax:</strong> <pre> str_slug(string); </pre> <strong>Example:</strong> <pre class="prettypri.....

By Hardik Savani | July 5, 2016 | | 1037 Viewer | Category : Laravel
READ MORE

How to generate random unique string in Laravel 5?

Laravel provide several string helper that way we can use it easily like str_limit, str_plural, str_finish, str_singular etc. If you need to generate unique random string then you can use str_random() helper of Laravel. It is very simple and you can use easily. str_random() helper take one numeric argument and return number of unique string that you pass as argument. you can see it's syntax and example: <strong>Syntax:</strong> <pre> str_random(number); </pre> <strong>Example:</strong> <pre class="prettyprint lang-php"> $random = str_random(30); </pre>

By Hardik Savani | June 29, 2016 | | 1016 Viewer | Category : Laravel
READ MORE

    PHP - How to convert HTML file to PDF using Dompdf library?

    PHP - How to convert HTML file to PDF using Dompdf library?

    Open Post

    Bootstrap progress bar animate example using bootstrap-progressbar.js

    Bootstrap progress bar animate example using bootstrap-progressbar.js

    Open Post

    Laravel 5 Stripe example using Laravel Cashier from Scratch

    Laravel 5 Stripe example using Laravel Cashier from Scratch

    Open Post

    Laravel 5 Redirect to URL using redirect() helper

    Laravel 5 Redirect to URL using redirect() helper

    Open Post

    AngularJS - simple image upload with preview example in PHP

    AngularJS - simple image upload with preview example in PHP

    Open Post

    How to get gravatar image from email using Jquery?

    How to get gravatar image from email using Jquery?

    Open Post