Tag : helper


How to make read more link from string in PHP?

We may require to make read more function in core php project. read more link require to create when you have long text or string and limited space to display that text at that time we need to make read more link after some words or character. Here, in this example you will learn how to make read more link after specific character length. if you require after some text read more button or '...', that way user can click on it and see more details from there. So here you can do it using php substr(). PHP substr() through we will get specific character from string and return with read more link.....

By Hardik Savani | April 11, 2017 | | 865 Viewer | Category : PHP
READ MORE

Laravel 5 - Custom Helper Facade Class Example from scratch

Today, In this post i am going to share with you how to create custom global helper functions using Helper Facade in our Laravel 5 application. We always need to define some global functions for our application because that way we can access that helper functions from every file of our project. In this tutorial i am going to share with you how we can make global helper function in Laravel framework from scratch. It is very important to create custom helper functions we have before start our projects. In this post we learn how to create custom Helper facade, i also posted few days ago <a href=.....

By Hardik Savani | March 5, 2017 | | 9447 Viewer | Category : PHP Laravel
READ MORE

Laravel 5 - Simple user access control using Middleware

We always require to built user access control in our application, when we start. I posted <a href="http://itsolutionstuff.com/post/laravel-52-user-acl-roles-and-permissions-with-middleware-using-entrust-from-scratch-tutorialexample.html" target="_blank">User ACL Roles and Permissions using entrust</a> for laravel 5 application. But as you can see on my post it is very useful and fantastic, But if you have big application or like e-commerce application. Because User ACL is take a time to implement. Yes, if you have small or medium level application and you don't require to make permission with.....

By Hardik Savani | February 26, 2017 | | 30189 Viewer | Category : PHP Laravel
READ MORE

How to get keys name from array using array helper in PHP Laravel ?

Few days ago, I was working on my new Laravel 5.4 application and i require to get keys name from my array. i was thing how we can get it and laravel provide us for to do it. Finally i found array helper function in Laravel docs. There are several array helper function available for array. I found array_keys() helper for getting keys name from our array. array_keys() will return array of keys. It could be easy to work with keys name in array. So in this example i want to share with you small example using array_keys() helper. I created one route "myarraykeys" with my $myArray variable, and .....

By Hardik Savani | February 18, 2017 | | 1202 Viewer | Category : PHP Laravel
READ MORE

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 | | 3754 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 | | 1997 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 | | 4128 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 | | 2825 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 | | 2702 Viewer | Category : Laravel
READ MORE

    Laravel 5 create custom artisan command with example

    Laravel 5 create custom artisan command with example

    Open Post

    PHP - How to Convert file(image, audio, video) extension using CloudConvert API?

    PHP - How to Convert file(image, audio, video) extension using CloudConvert API?

    Open Post

    Solved Issue - "/usr/bin/env: ‘node’: No such file or directory"

    Solved Issue - "/usr/bin/env: ‘node’: No such file or directory"

    Open Post

    How to create custom helper in Laravel 5?

    How to create custom helper in Laravel 5?

    Open Post

    Laravel 5 Facebook authentication using Socialite Package

    Laravel 5 Facebook authentication using Socialite Package

    Open Post

    Angularjs nl2br(textarea newline and linebreak conversion) example with demo

    Angularjs nl2br(textarea newline and linebreak conversion) example with demo

    Open Post