If you're existing Laravel user, you know that Laravel has make pagination easy. If you're new, I will show you how. First of all, in your app/routes.php, add in an extra routes. <?php // ... Route::get('items', array( 'as' => 'items',…
Laravel Ajax Pagination with jQuery
Laravel has make pagination very easy. In this post I will show you how to make a single Ajax pagination in Laravel with jQuery. Controller: app/controllers/BlogController.php <?php class BlogController extends Controller { /** * Posts * * @return void */…
Laravel Schedule Tasks Artisan Commands with Dispatcher
Wiki Dispatcher Dispatcher is a Laravel artisan command scheduling tool used to schedule artisan commands within your project so you don't need to touch your crontab when deploying. Cron The software utility Cron is a time-based job scheduler in Unix-like…
Save a PNG image from a base64 data string with PHP
We can extract the base64 image data from that string, decode it and save it to disk, don't need GD since it already is a png. <?php // requires php5 define('UPLOAD_DIR', 'images/'); $img = $_POST['img']; $img = str_replace('data:image/png;base64,', '', $img);…