Notifikasi
This commit is contained in:
@@ -18,8 +18,7 @@ class JadwalSalurdanaController extends Controller
|
||||
|
||||
public function index()
|
||||
{
|
||||
return view('jadwal_salurdana.index')
|
||||
->with('i', (request()->input('page', 1) - 1) * 10);
|
||||
return view('jadwal_salurdana.index');
|
||||
}
|
||||
|
||||
public function datatable(Request $request)
|
||||
|
||||
@@ -9,14 +9,78 @@ use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class NotifikasiController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function __construct(){
|
||||
$this->siteTitle = "Notifikasi";
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
//
|
||||
return view('notifikasi.index');
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
{
|
||||
}
|
||||
|
||||
public function edit(DbhBelanjaRealisasi $realisasi_belanja)
|
||||
{
|
||||
}
|
||||
|
||||
public function update(Request $request, DbhBelanjaRealisasi $realisasi_belanja)
|
||||
{
|
||||
}
|
||||
|
||||
public function datatable(Request $request)
|
||||
{
|
||||
$post = $request->all();
|
||||
$offset = $post["start"];
|
||||
$limit = $post["length"];
|
||||
$src = $post["src"];
|
||||
|
||||
$dataFilter=0;
|
||||
$data = Notifikasi::where("userid",Auth::user()->id)->orderBy("created_at","DESC");
|
||||
if (!empty($src)){
|
||||
$data->whereRaw("(LOWER(message) LIKE '%".strtolower($src)."%')");
|
||||
}
|
||||
$dataFilter = $data->count();
|
||||
$dataTotal = Notifikasi::where("userid",Auth::user()->id)->count();
|
||||
|
||||
return response()->json([
|
||||
"recordsTotal" => $dataTotal,
|
||||
"recordsFiltered" => $dataFilter,
|
||||
"data"=> $data->skip($offset)->take($limit)->get()
|
||||
]);
|
||||
}
|
||||
|
||||
public function destroy(DbhBelanjaRealisasi $realisasi_belanja)
|
||||
{
|
||||
// try{
|
||||
// DB::beginTransaction();
|
||||
// $realisasi_belanja->delete();
|
||||
// DB::commit();
|
||||
// return redirect()->route('realisasi-pendapatan.index')
|
||||
// ->with('success','Data Realisasi Pendapatan berhasil dihapus!');
|
||||
|
||||
// }catch(Throwable $e){
|
||||
|
||||
// DB::rollBack();
|
||||
// return redirect()->route('realisasi-pendapatan.index')
|
||||
// ->with('error','Data Realisasi Pendapatan gagal dihapus.');
|
||||
// }
|
||||
}
|
||||
|
||||
public function show(DbhBelanjaRealisasi $realisasi_belanja)
|
||||
{
|
||||
// if (!Auth::user()->can("Lihat SKPP")){
|
||||
// abort(403, 'Youre not allowed to visit this page!');
|
||||
// }
|
||||
// $this->setSubtitle("Detail Data");
|
||||
// return view('realisasi_belanja.show',compact("realisasi_belanja"));
|
||||
}
|
||||
|
||||
public function getNotif(Request $request)
|
||||
|
||||
@@ -21,8 +21,7 @@ class RealisasiBelanjaController extends Controller
|
||||
|
||||
public function index()
|
||||
{
|
||||
return view('realisasi_belanja.index')
|
||||
->with('i', (request()->input('page', 1) - 1) * 10);
|
||||
return view('realisasi_belanja.index');
|
||||
}
|
||||
|
||||
public function create()
|
||||
|
||||
Reference in New Issue
Block a user