Harrisonm

How to clear Facebook Share’s Cache

Facebook share is good, simple, lets us share almost everything on web in seconds. But Facebook caches already shared urls/pages for better performance. This causes issues at time when we update the title, picture being shared or the description of the page because Facebook still shows the older version of...Read more …
Harrisonm

Preview an image before it is uploaded

I want to be able to preview a file (image) before it is uploaded. The preview action should be executed all in the browser without using Ajax to upload the image. [crayon-5b4fbae90c148174434482/] and the associated HTML: [crayon-5b4fbae90c150015050976/] The FileReader object lets web applications asynchronously read the contents of files (or...Read more …
Harrisonm

How to store all records in laravel Cache

You can easily save database record in cache and easily you can get that record from cache in Laravel. Cache is knows as persistence layer between database and application and it is used to improve website performance because sometime database query is going very slow due to lots of traffic...Read more …
Harrisonm

How to get last executed mysql query in laravel 5

Sometime while working with laravel framework you need to see last executed query for debugging . You can use DB::getQueryLog() function to get all executed queries if you want to get last executed then use end()method. Before getting query log you need to first enable it by using DB::enableQueryLog() function...Read more …
Harrisonm

Upload & Resize Image in Laravel

If you want to add image field in exiting form or any other for then follow the steps :- You will need to add below code in controller : Path : resources/themes/default/views/pages/category.blade.php Add your field in blade file :- [crayon-5b4fbae90ce89878439171/]    Path :- app/Http/Controllers 1). use Intervention\Image\Facades\Image; in header 2). Add...Read more …