It Solution Stuff provide a collection of tutorials about PHP, Laravel Framework, Codeigniter Framework, Mysql Database, Bootstrap Front-end Framework, Jquery, Node JS, Ajax Example, APIs, CURL Example, Composer Packages Example, AngularJS etc. You will find the best example an article about PHP Language. So you can also search tutorial from bellow search box.

Please Subscribe Your Email Address, We Will Notify When Add New Post:

Latest Post

How to add text on image in laravel 5?

if you are use laravel and you want to add text on image or resize, crop image then we can do with "intervention/image" pakacke. you have to just follow few step and you can add text on image. <strong>Step 1 : </strong>you have to add package on your laravel project by using composer like : <pre>composer require intervention/image</pre> <strong>Step 2 :</strong> then you have to add provider path and alias path in config/app.php file like : In $provides : <pre>'Intervention\Image\ImageServiceProvider'</pre> In $aliases : <pre>'Image' => 'Intervention\Image\Facades\Image'</pre> [ADDCODE].....

By Hardik Savani | January 30, 2016 | | 39396 Viewer | Category : Laravel

How to get days difference between two dates in laravel?

Whenever you need to get difference between two dates in date in laravel 5 then you can get easily using Carbon. Laravel by default provide Carbon class. Carbon class throught you can calculate difference between two dates in days. In Following example you can see, we have a two dates, first $to variable and second one $from variable. Carbon class diffInDays function using you can get difference between two dates. I hope you will find your solution. <strong>Example:</strong> <pre class="language-php"> $to = \Carbon\Carbon::createFromFormat('Y-m-d H:s:i', '2015-5-5 3:30:34'); $from = \Carbon\.....

By Hardik Savani | January 29, 2016 | | 39645 Viewer | Category : Laravel

How to remove null values from array in PHP?

you have array with null value and you want to remove all null value from that array without loop. you can remove your all null value from array without loop. PHP array_filter function through you can remove all null value, you see following example how to remove null value : <strong>Example:</strong> <pre class="language-php"> $example = array(100, "hardik", null, "hey", NULL, "", 77); $result = array_filter($example, function($value) { return !is_null($value); }); print_r($result); </pre> <strong>Output:</strong> <pre>Array ( [0] => 100 [1] => hardik [3] => hey [5.....

By Hardik Savani | January 28, 2016 | | 22278 Viewer | Category : PHP

HTML/FORM not found in Laravel 5?

If you want to use Form or Html class and when you will see error like ‘HTML’ class not found OR ‘Form’ class not found. don’t worry about that because Laravel 5 change the package. you should download the HTML and FORM class helper from given instruction above. Add given bellow text to your composer.json file. <pre>"require": { "laravel/framework": "5.0.*", "laravelcollective/html": "~5.0" },</pre> <strong>OR</strong> <pre>composer require laravelcollective/html</pre> after fire composer update command After Update composer, open config/app.php and add this line to the ‘providers.....

By Hardik Savani | January 27, 2016 | | 59783 Viewer | Category : Laravel

How to add LIKE query in Elasticsearch?

I want to use LIKE query as work on sql, i mean If using a SQL or Mysql 'Like' query to query data it will return data even if its only partially matched. if i search just 't' then it will return all the records match 't'. so you can add LIKE statement by using 'query_string'. you can easily implement LIKE statement by using 'query_string', in following example you can see how to impletemt: <pre class="language-php"> $search = 't'; $sql = json_decode(' { "type": "main", "query_cache": true, "body": { "size": 500, "query": { .....

By Hardik Savani | January 26, 2016 | | 20821 Viewer | Category : Elasticsearch