keithg

set Custom empty message in datatable

$(‘#accalls’).dataTable({ “language”: { “sEmptyTable”: “Set Custom Message”, // no record in a table “infoEmpty”: “Set Custom Message”,  // when search and not found “zeroRecords”: “Set Custom Message”, } });Read more …
keithg

Spatie Media Library – laravel

composer require spatie/laravel-medialibrary:^7.0.0 php artisan vendor:publish –provider=”Spatie\MediaLibrary\MediaLibraryServiceProvider” –tag=”migrations” php artisan migrate php artisan vendor:publish –provider=“Spatie\MediaLibrary\MediaLibraryServiceProvider” –tag=“migrations” php artisan migrate Example Avtar. add in register blade file.   do not forgot to add > enctype=”multipart/form-data” in form <div class=”form-group row”> <label for=”avatar” class=”col-md-4 col-form-label text-md-right”>{{ __(‘Avatar (optional)’) }}</label> <div class=”col-md-6″> <input id=”avatar”...Read more …
keithg

Laravel Important points

* \Carbon\Carbon::now() // insert current date * Auth::user()->id // current user id * if ($request->hasFile(‘bussiness_pan_image’)) * insertGetId // last id of $id = DB::table(‘posts’)->insertGetId( array(‘title’ => ‘my post title’, ‘body’ => ‘my post body’) ); dd($id); * ‘confirm_password’ => ‘required|same:password’, //for confirm password * ‘password’ => ‘sometimes|nullable|min:6’, // optional but...Read more …