I think you missed the "order" in your query, try the following:
protected function getJobs(){ $jobs = Job::Join('customer','jobs.customerid','=','customer.id') ->select(array('jobs.id','customer.firstname','customer.lastname','jobs.jobstatus','jobs.trialdate','jobs.deliverydate')) ->orderBy('customer.lastname')->get(); return Datatables::of($jobs) ->addColumn('action', '<a class="btn btn-default btn-xs" data-toggle="tooltip" data-placement="top" title="Edit" href="{{ URL::to(\'updatejob/\'.$id) }}"><i class="fa fa-pencil"></i></a>') ->make(); }
source share