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 | | 5353 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 | | 5399 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 | | 5894 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 | | 687 Viewer | Category : PHP MySql
READ MORE

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" class.you 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 | | 1297 Viewer | Category : Laravel
READ MORE


Sort Sendgrid Multi Auth Current select box search Inserted Id thomaswelton/laravel-gravatar Sublime text 2 ppa Controluser Node JS Bootstrap Notify Plugin Language API Allow Cache KCFinder Delete Access Amazon S3 Join Empty Environment PHP artisan Ubuntu 14.04 Admin Panel Zip PHP Segment Bootstrap Plugin Composer Artisan Command Repository Pattern Automatically encrypter SEO Where Not In Query clearInterval() Import Fetch toArray() Tooltip ngclipboard.js response() PHPUnit Hard Laravel 4 npm Sublime text 3 Field orderBy Force Convert DB timestamps Custom no-captcha Log Website Paypal Integration Control Top Ckeditor Div Element SUBSTRING_INDEX() Directory google recaptcha code Letter Ajax Request Animate Pull gravatar setInterval() WHERE Query Ip Address Database Seeder Jquery Modal Send Socket.io FadeOut array_combine RAND() Message Query Builder csv Configuration Mysql Concat Where In Query stevebauman/location composer package Typeahead JS intervention/image Phonegap getQueryLog colorpicker Page voyager package Remote Localization XSS Twitter API dompdf Mediafıre API str_random() slice() Link Attr throttle Algolia Package Query Custom Command Object to Array array_change_key_case Codeigniter 3 Artisan Branch Image Gallery Pagination laravel-elixir Foreach helper PayPal filter Animation filesize() Protection typed.js plugin groupBy() tree view Service Provider Email Verification Current Page chumper/zipper Nodejs pngquant Toggle Draggable RSS sven/artisan-view package Run Project Update File Upload Bootstrap show password Plugin Technology Pixel Local Demo Image Subscribe upload_max_filesize