Latest Post

How can make an array from the values of another array's key?

If you are working on PHP or other PHP framework and you want to create array of another array value. now you can see on following example how can you make array form another multidimensional array key's. For example you have array like: <pre class="language-php"> $multi = array( ['1'] => array('id'=>1,'name'=>'hardik'), ['2'] => array('id'=>1,'name'=>'vimal'), ['3'] => array('id'=>1,'name'=>'harshad'), ) </pre> but if you want to this multi-dimensional array just like this way: <pre class="language-php"> $test = array('hardik','vimal','harshad'); </pre> so, we can make t.....

By Hardik Savani | January 21, 2016 | | 917 Viewer | Category : PHP

How to merge two array with same keys without loop in PHP ?

you want to merge two array but without overwrite value then you can see how to merge two array in following have two array and you want to merge with overwrite with key then you fetch many problem. like this two array : <strong>My Array:</strong> <pre class="language-php"> $array1 = [ '0'=> ['name'=>'Hardik','Surname'=>'Savani'], '1'=> ['name'=>'Harsukh','Surname'=>'Makawana'], ]; $array2 = [ '0'=> ['name1'=>'Harshad','Surname1'=>'Pathak'], '1'=> ['name1'=>'Vimal','Surname1'=>'Kashiyani'], ]; </pre> AND You want.....

By Hardik Savani | January 21, 2016 | | 3834 Viewer | Category : PHP

How to create and check custom header with middleware for REST API in Laravel 5 ?

In Laravel 5 REST API project sometime we need to create create our own custom header for security. like : 'X-hardik':'123456'. this was example, that means in your current project your every request with pass your own custom header like i give you example.this custom header can improve your security. we can also check your header is right or wrong.example : <strong>Your Jquery or AngularJS Request</strong> <pre class="language-javascript"> $.ajax({ type: 'POST', dataType: 'json', url: 'http://test.hd/api/login', headers: { 'X-hardik': '123456'}.....

By Hardik Savani | January 20, 2016 | | 14147 Viewer | Category : Laravel

GROUP_CONCAT with different SEPARATOR in laravel Example

Whenever, you need to use GROUP_CONCAT with differente separator(I mean default separator is ',', But you want to change '@','#','&' etc as you want). then you have to use use SEPARATOR keyword in GROUP_CONCAT(). If you are working on laravel then you have to also use DB::raw() for write GROUP_CONCAT() inside the this function. So, Basically how to change seprator in group_concat(), In following example i change ',' separator into '@'.you can use the following example how to use in laravel 4 and 5. <strong>Example:</strong> <pre class="language-php"> $items = DB::table('items') -.....

By Hardik Savani | January 20, 2016 | | 9698 Viewer | Category : Laravel MySql

Laravel after login, redirect back to previous url ?

If you are working on laravel and you want to do like: How to redirect back to previous url, After login. after login user you can redirect his previous page as he was before. you can do this, i would like to give you two example. first example is using intended() and second one is using session but i don't know more but i think intended() is not working proper in laravel 5 but you can try in laravel 4. but i am sure i gave you example with session that work well in both. So, you can try any one and get your solution, 1. using intended() and 2. session. <strong>Example 1:</strong> <pre class.....

By Hardik Savani | January 15, 2016 | | 11505 Viewer | Category : Laravel

Switchery JS Send Data Specific softDeletes Null Installation sven/artisan-view package Percentage Undefined Query Import Accordion Folder Enable Strings Scratch Google API WHERE Query 500 error page Laravel Resource GuzzleHttp Linkedin API Count Magento read more Lightbox Failed File Now json() Tracking Gmail Jquery Dialog Box FIND_IN_SET() Tag Manager plugin Laravel Cashier Example whitespace JSON Magento 2 filter_var Script croppie.js away() Laravel 5.4 MySQL Subquery Grayscale Image File Upload Parameters FadeOut Timepicker Multi Auth Character Language Base URL XML Autocomplete select box search Directory Package CloudConvert API google recaptcha code Linux ajaxComplete Controller Image Gallery Where In Query Opencart Form Jquery toArray() Numeric ajaxStart Jquery UI basename() Node JS Pixel Key Constraint Column Chosen JS Object to Array Codeigniter 3 Search chmod Custom Command Run Project Google Chart Executed Key PHPUnit Technology Draggable array_combine ID Remember me Animation Div Database Seeder bootstrap-growl Rewrite Excel Highlight JS Configuration Highchart Bootstrap Notify Plugin maatwebsite Ubuntu 14.04 guzzle http client pop() Modular tree view Controluser gravatar Delete Application QR Code Location SMTP Confirm Box AngularJS Popup Box throttle Dialog box Add Amazon S3 Sublime Javascript Upgrade hasTable Prompt modal 404 error page Dropbox API Commit SEO Blocked Demo gmaps.js Class Loading IP clearInterval() Convert Tooltip Stripe Variable Trans Helper tagsinput.js dompdf auth() MSSQL