Latest Post

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 | | 12282 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 | | 8968 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 | | 10308 Viewer | Category : Laravel

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 | | 1186 Viewer | Category : PHP MySql

How to count number of files in folder and remove all files in folder example in Laravel 5 ?

you are working on laravel framwork and you want to count how many image or files in folder and print of front then you can do with laravel "File" can also count in core PHP by using glob() but if you are working on laravel then you have to use 'File' class library and it is easy and more flexible to use. If you also want to remove all the files Or images in specific folder then you can delete by using "File" class function. sometimes we need to delete files in the folder. that way: <pre class="language-php"> use Input; use File; class HomeController extends AdminController { .....

By Hardik Savani | January 13, 2016 | | 2335 Viewer | Category : Laravel

voyager package Select Ajax Request clearbit API Export select2.js ACL Bootstrap show password Plugin Bootstrap maxlength plugin MVC Loop Hard Laravel JS Run Project Inserted Id File Upload apache2 Mysql Concat Strip Tags Mediafıre API X-editable Plugin Website Path is_null Database Composer Terminal virtual host FadeOut Blocked summernote Import basename() split Validation Controller Automatically SMTP array_change_key_case Paytm Dropbox API Subscription Log LIKE Query Lavacharts Mail MSSQL Update strtolower Current WHERE Query jquery.lazyload.js Artisan Command Multi Auth Input Sort Query Builder Bitbucket Google OAuth yajra/laravel-datatables-oracle orderBy Trans Helper API Facade MySQL Subquery Email Barcode throttle Master Count Class Download Controluser Issue Chat Captcha code Amazon S3 Route Google Chart 500 error page Script Jquery Plugin Package Vue.JS URL Laravel Eloquent Remember me Behance API softDeletes Fetch Codeigniter DB pngquant Git Data Node JS Bootbox.js auth() away() Fullcalendar JS enableQueryLog Grayscale Image Custom Command Authentication Attribute Now User Zip SweetAlert Plugin Sortable encrypter FIND_IN_SET() Event Each Express Sublime public_path Sublime text 3 Parsleyjs inner join bootstrap-growl Folder Recursive google recaptcha code Library Artisan Laravel 5 ServiceProvider ppa Permission mCustomScrollbar Plugin COUNT() Segment Pixel Laravel 5.4 - Markdown Mailables Application Chosen JS Jquery Dialog Box Foreign Key Bootstrap Confirmation js plugin Where In Query no-captcha Opencart Laravel 5.4 Auth Billing FILTER_VALIDATE_URL Ubuntu 14.04 Cordova