jQuery Datatables and Laravel 6.x Pagination

jQuery DataTables is a table component that is powerful for data management. These plugins provide searching, sorting, pagination, filter per column, and many more. But we have some problems combining jQuery Datatables and Laravel framework.

We separate applications (Rest API and User Interface). For Rest API we use Laravel Framework and for User Interface use Laravel too, but we only Blade component and Guzzle as HTTP Client Library.

We now Laravel has good packages for handle it, as far I know Yajra’s good and incredible packages (you can see Yajra’s package on Github). But using Yajra’s library was not possible at that time, because Yajra was using Eloquent and can’t use HTTP Client (like Guzzle, UniRest, etc). Then we do research to deal with this problem and got results as we would discuss in this post.

On these tutorials, we use an empty Laravel 6.x project with Bootstrap 3, jQuery Datatables plugins. Our goal in this tutorial is to Display User Lists in Datatables (Searching and Sorting also). Ok let’s start the codings. Read More

Installing Laravel Homestead On Windows Machine

Prerequisites

  • Windows 7 / 8
  • Internet
  • Virtual Box 5.1.14r112924. Download here
  • Vagrant 1.9.1. Download here
  • Laravel Homestead Box 1.1.0. Download here (name it virtualbox.box)

After downloading Laravel Homestead Box 1.1.0, save virtualbox.box file to C:\virtualbox.box

Install Virtualbox

Install Vagrant too then reboot your machine

After your machine already boot, Run Windows Command Prompt and add vagrantbox :

If vagrantbox success installed, open Windows Explorer then go to :

%userprofile%\.vagrant.d\boxes\laravel-VAGRANTSLASH-homestead

rename folder 0 (zero) to 1.1.0

Back to Windows Command Prompt, create vagrant homestead folder

Open Windows Explorer then go to D:\homestead-laravel

Run init.bat

Clone your Laravel Project, example from official laravel git

After finish installing, run this command

Goback to Windows Explorer navigate D:\homestead-laravel

Edit Homestead.yaml file and find this code

Change to

Time to running laravel homestead

Go back to Windows Command Prompt

Shutdown Vagrant

Best Laravel 5.1.x Auth Packages (For Me…)

Laravel 5 auth, there are so many authentification packages on this framework make me feel sick, hahhahaha! on trial and error process, and also their package codes are clean for me. This is my best choise

Sentry [DEPRECATED]

Source : https://github.com/cartalyst/sentry/tree/feature/laravel-5

How to install?

Add this code on your composer.json

Then run command

Entrust

Source : https://github.com/Zizaco/entrust

How to install?

Add this code on your composer.json

Then run command

Defender

Source : https://github.com/artesaos/defender

How to install?

Add this code on your composer.json

Then run command

Verify

Source : https://github.com/Toddish/Verify

How to install?

Add this code on your composer.json

Then run command

BeatSwitch

Source : https://github.com/BeatSwitch/lock-laravel

How to install?

Add this code on your composer.json

Then run command

Super Simple Laravel 5.x Layout

Create folder structure like this

laravel-view-structure
Laravel View Structure

On the layouts folder create main layout named it master.blade.php, and copy paste this code

On partials folder create new file named it header-media.blade.php, and copy paste this code

On partials folder create new file named it footer.blade.php, and copy paste this code

On modules/user folder create 2 files named it form.blade.php and index.blade.php

open file form.blade.php then copy this code

open file index.blade.php then copy this code

from your controller call the view like this

Ok, That’s its! Pretty simple right? See you in next tutorials.

Just Tracing Laravel Cashier

Hahhahahahaha.. What’s the point in this post??? But it’s very usefull for me.. and for you?

For client side you just add this code.. simple huuh?

Okeeyyyy, let’s me see behind that code! Trace… trace… and trace.. (how i can make a clean code like this!)
Read More