Latest Post

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 example.you 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 | | 673 Viewer | Category : PHP
READ MORE

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 | | 4350 Viewer | Category : Laravel
READ MORE

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 | | 3903 Viewer | Category : Laravel MySql
READ MORE

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 | | 4591 Viewer | Category : Laravel
READ MORE

How to count unique domains from email address field in MySQL ?

you want to count domain from your email address field in mysql. if you are working on PHP then you could do easily by using explode function and counting domains, but that way is a very bad logic and it take max time on execution when you have lot of data. But we can do easily in MySQL by using SUBSTRING_INDEX(). SUBSTRING_INDEX() take a three arguments string, delimeter and number.string is a source of string, the delimeter to search for in the string and the number parameter will search for delimeter.If pass negative in third argument then it will everything from the left of the targeted .....

By Hardik Savani | January 14, 2016 | | 610 Viewer | Category : PHP MySql
READ MORE


array_combine Number PHPExcel Element Artisan Bitbucket Lightbox Terminal Environment Magento 2 DB::raw() strpos Homepage ajaxComplete chumper/zipper yajra/laravel-datatables-oracle characters Date Format DATEDIFF() MySQL Subquery Algolia Package Log Thumbnails Tooltip Branch Localization SUBSTRING_INDEX() read more Stripe Clear Chosen JS Image Upload Cross SMTP toastr js filter_var Contact US Form Laravel Eloquent Jquery Dialog Box JWT Database Seeder Sublime text 3 Laravel 5.2 Sublime text 2 Xampp Excel FIND_IN_SET() Sitemap Local Blade inject Mysql Concat clipboard.js Pagination Sublime CRUD Google OAuth KCFinder Executed Enable Tracking Email Elasticsearch length JS Snippet inner join Check Parameters Listener Client side validation Javascript Toggle Bootstrap-lightbox Plugin google recaptcha code After XML Plugins away() Input thujohn/twitter package Send Instagram API MSSQL Installation First glob Technology Namespace Paging Limit Resize Image Datepicker View Column date_format() HTML User Socket.io Lavacharts Percentage Packages Multi Auth Ubuntu PayPal CloudConvert API clearbit API marker Bootbox.js Confirm Box thomaswelton/laravel-gravatar Object to Array Ajax Request Select Parsleyjs Artisan Command xoxco tags input dompdf Protection Express Image Cordova Highchart Mailgun API nl2br Event Laravel Cashier API Folder Chart laravel-elixir auth() Subscription Popup Box PHPUnit URL Schema Frontside Validation datatables Billing Tag Manager plugin DATE_SUB filter Modal is_null Git Form Jquery Special ServiceProvider str_random() Facade