Commit 4c0f3542 by leo

no message

parents
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
* The Artisan commands provided by your application.
*
* @var array
*/
protected $commands = [
//
];
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
// $schedule->command('inspire')
// ->hourly();
}
/**
* Register the Closure based commands for the application.
*
* @return void
*/
protected function commands()
{
require base_path('routes/console.php');
}
}
<?php
namespace App\Events;
use Illuminate\Broadcasting\Channel;
use Illuminate\Queue\SerializesModels;
use Illuminate\Broadcasting\PrivateChannel;
use Illuminate\Broadcasting\PresenceChannel;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
class SomeEvent
{
use InteractsWithSockets, SerializesModels;
/**
* Create a new event instance.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Get the channels the event should broadcast on.
*
* @return Channel|array
*/
public function broadcastOn()
{
return new PrivateChannel('channel-name');
}
}
<?php
namespace App\Exceptions;
use Exception;
use Illuminate\Auth\AuthenticationException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
class Handler extends ExceptionHandler
{
/**
* A list of the exception types that should not be reported.
*
* @var array
*/
protected $dontReport = [
\Illuminate\Auth\AuthenticationException::class,
\Illuminate\Auth\Access\AuthorizationException::class,
\Symfony\Component\HttpKernel\Exception\HttpException::class,
\Illuminate\Database\Eloquent\ModelNotFoundException::class,
\Illuminate\Session\TokenMismatchException::class,
\Illuminate\Validation\ValidationException::class,
];
/**
* Report or log an exception.
*
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
*
* @param \Exception $exception
* @return void
*/
public function report(Exception $exception)
{
parent::report($exception);
}
/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Exception $exception
* @return \Illuminate\Http\Response
*/
public function render($request, Exception $exception)
{
if($this->isHttpException($exception))
{
switch ($exception->getStatusCode()) {
case 404:
return redirect()->route('notfound');
break;
case '500':
return redirect()->route('notfound');
break;
default:
return $this->renderHttpException($exception);
break;
}
}
else{
return parent::render($request, $exception);
}
}
/**
* Convert an authentication exception into an unauthenticated response.
*
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Auth\AuthenticationException $exception
* @return \Illuminate\Http\Response
*/
protected function unauthenticated($request, AuthenticationException $exception)
{
if ($request->expectsJson()) {
return response()->json(['error' => 'Unauthenticated.'], 401);
}
return redirect()->guest('login');
}
}
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
class ForgotPasswordController extends Controller
{
/*
|--------------------------------------------------------------------------
| Password Reset Controller
|--------------------------------------------------------------------------
|
| This controller is responsible for handling password reset emails and
| includes a trait which assists in sending these notifications from
| your application to your users. Feel free to explore this trait.
|
*/
use SendsPasswordResetEmails;
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest');
}
}
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Auth;
use Illuminate\Http\Request;
use Validator;
use App\User;
use Input;
class LoginController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
//$this->middleware('guest', ['except' => 'logout']);
}
public function Login(Request $request){
$validator = Validator::make($request->all(), [
'username' => 'required|exists:users,username',
'password' => 'required',
], [
'username.required' => 'Username diperlukan!',
'username.exists' => 'Username tidak diketemukan',
'password.required' => 'Password diperlukan'
]);
if ($validator->fails()) {
return redirect('/')
->withErrors($validator)
->withInput();
} else {
if (Auth::attempt(['username' => $request->username, 'password' => $request->password])) {
if(Auth::user()->role == 'manager'){
return redirect()->intended('manager')->with('info','Login berhasil sebagai Manager');
} elseif(Auth::user()->role == 'pegawai'){
return redirect()->intended('pegawai')->with('info','Login berhasil sebagai Pegawai');
} elseif(Auth::user()->role == 'receptionist'){
return redirect()->intended('receptionist')->with('info','Login berhasil sebagai Receptionist');
} elseif(Auth::user()->role == 'administrasi'){
return redirect()->intended('administrasi')->with('info','Login berhasil sebagai Administrasi');
} elseif(Auth::user()->role == 'gmaster'){
return redirect()->intended('gmaster')->with('info','Login berhasil sebagai Master');
} else {
}
} else {
$validator->errors()->add('password', 'Password tidak benar');
return redirect('/')
->withErrors($validator)
->withInput();
}
}
}
public function resetpass(){
return view('auth.passwords.reset');
}
public function reset(Request $request){
$validator = Validator::make($request->all(),[
'password_lama' => 'required',
'password' => 'required|confirmed',
'password_confirmation' => 'required'
],[
'password_lama.required' => 'Password Lama diperlukan',
'password.required' => 'Password diperlukan',
'password.confirmed' => 'Password tidak sama',
'password_confirmation.required' => 'Confirmation Password diperlukan'
]);
if ($validator->fails()) {
return redirect()->back()
->withErrors($validator)
->withInput();
} else {
$username = Auth::user()->username;
$check = Auth::attempt(['username' => $username,'password' => $request->password_lama]);
if($check){
User::find(Auth::user()->id)->update(['password' => bcrypt($request->password)]);
Auth::attempt(['username' => $username,'password' => $request->password]);
return redirect()->back()->with('info','Password berhasil diubah');
} else {
$validator->errors()->add('password_lama', 'Password tidak benar');
return redirect()->back()
->withErrors($validator)
->withInput();
}
}
}
}
<?php
namespace App\Http\Controllers\Auth;
use App\User;
use Validator;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\RegistersUsers;
class RegisterController extends Controller
{
/*
|--------------------------------------------------------------------------
| Register Controller
|--------------------------------------------------------------------------
|
| This controller handles the registration of new users as well as their
| validation and creation. By default this controller uses a trait to
| provide this functionality without requiring any additional code.
|
*/
use RegistersUsers;
/**
* Where to redirect users after login / registration.
*
* @var string
*/
protected $redirectTo = '/home';
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest');
}
/**
* Get a validator for an incoming registration request.
*
* @param array $data
* @return \Illuminate\Contracts\Validation\Validator
*/
protected function validator(array $data)
{
return Validator::make($data, [
'name' => 'required|max:255',
'email' => 'required|email|max:255|unique:users',
'password' => 'required|min:6|confirmed',
]);
}
/**
* Create a new user instance after a valid registration.
*
* @param array $data
* @return User
*/
protected function create(array $data)
{
return User::create([
'name' => $data['name'],
'email' => $data['email'],
'password' => bcrypt($data['password']),
]);
}
}
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\ResetsPasswords;
class ResetPasswordController extends Controller
{
/*
|--------------------------------------------------------------------------
| Password Reset Controller
|--------------------------------------------------------------------------
|
| This controller is responsible for handling password reset requests
| and uses a simple trait to include this behavior. You're free to
| explore this trait and override any methods you wish to tweak.
|
*/
use ResetsPasswords;
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest');
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
class Controller extends BaseController
{
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use DB;
class DownloadController extends Controller
{
public function downfunc(){
$downloads=DB::table('upload')->get();
return view('download.viewfile', compact('downloads'));
}
}
\ No newline at end of file
<?php
namespace App\Http\Controllers;
use App\Http\Request;
use App\Http\Controllers\Controller;
use App\pembayaran;
use Illuminate\Support\Facades\Input;
use DB;
use Excel;
class ExcelController extends Controller
{
//IMPORT
public function getImportPembayaran(){
return view('excel.importPembayaran');
}
//EXPORT
public function getExportPembayaran(){
$pembayaran=Pembayaran::all();
Excel::create('Export Data Pembayaran', function($excel) use($pembayaran){
$excel->sheet('Sheet 1', function($sheet) use($pembayaran){
$sheet->fromArray($pembayaran);
});
})->export('xlsx');
}
//POST IMPORT
public function postImportPembayaran(){
Excel::load(Input::file('pembayaran'),function($reader){
$reader->each(function($sheet){
Pembayaran::firstOrCreate($sheet->toArray());
});
});
$pembayarans = DB::table('tbl_transaksi')->paginate(10);
return redirect()->route('pembayaran.index',['pembayarans' => $pembayarans])->with('info','Import data berhasil dilakukan');
}
//DELETE
public function deleteAllPembayaran(){
DB::table('tbl_transaksi')->delete();
$pembayarans = DB::table('tbl_transaksi')->paginate(10);
return redirect()->route('pembayaran.index',['pembayarans' => $pembayarans])->with('info','Semua data telah berhasil dihapus');
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class HomeController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth');
}
/**
* Show the application dashboard.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
return view('home');
}
public function pagenotfound(){
return view('errors.503');
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Kamar;
class kamarController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$kamars = Kamar::all();
return view('kamar.index',['kamars' => $kamars]);
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
return view('kamar.create');
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
$this->validate($request,['jenis_kamar'=> 'required','harga_kamar'=> 'required', 'jumlah_kamar' => 'required',]);
$kamar = new Kamar;
$kamar->jenis_kamar = $request->jenis_kamar;
$kamar->harga_kamar = $request->harga_kamar;
$kamar->jumlah_kamar = $request->jumlah_kamar;
$kamar->save();
return redirect()->route('kamar.index')->with('info','Data berhasil ditambahkan');
}
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
$kamar = Kamar::findOrFail($id);
return view('kamar.edit', compact('kamar'));
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
$this->validate($request,['jenis_kamar'=> 'required','harga_kamar'=> 'required', 'jumlah_kamar' => 'required',]);
$kamar = kamar::findOrFail($id);
$kamar->jenis_kamar = $request->jenis_kamar;
$kamar->harga_kamar = $request->harga_kamar;
$kamar->jumlah_kamar = $request->jumlah_kamar;
$kamar->save();
return redirect()->route('kamar.index')->with('info','Data berhasil diubah');
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
$kamar = Kamar::findOrFail($id);
$kamar->delete();
return redirect()->route('kamar.index')->with('info','Data berhasil dihapus');
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use PDF;
use App\Pengunjung;
use App\Pembayaran;
class PDFController extends Controller
{
public function getPDFPembayaran(){
$pembayarans=Pembayaran::all();
$pdf=PDF::loadView('pdf.pembayaranAll', ['pembayarans'=>$pembayarans]);
return $pdf->stream('pembayaranAll.pdf');
}
public function showPDF($id){
$pembayarans = Pembayaran::findOrFail($id);
$pdf=PDF::loadView('pdf.pembayaran', ['pembayarans'=>$pembayarans]);
return $pdf->stream('pembayaran.pdf');
}
public function getPDFKeuangan(){
$pembayarans=Pembayaran::all();
$pdf=PDF::loadView('pdf.keuangan', ['pembayarans'=>$pembayarans]);
return $pdf->stream('keuangan.pdf');
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Pembayaran;
use Carbon\Carbon;
use Illuminate\Support\Facades\DB ;
class PembayaranController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$search = \Request::get('search');
$pembayarans = Pembayaran::where('nama','like','%'.$search.'%')->orderBy('id')->paginate(10);
// dd($pembayarans);
return view('pembayaran.index',['pembayarans' => $pembayarans]);
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
return view('pembayaran.create');
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
$this->validate($request,['nama'=> 'required', 'lama_menginap' => 'required', 'kontak' => 'required', 'jumlah_kamar' => 'required', 'check_in' => 'required', 'check_out' => 'required',]);
$data = DB::table('tbl_kamar')
->select('tbl_kamar.*')
->where('tbl_kamar.id' ,'=',$request['jenis_kamar'])
->get();
//dd($data,$request['jenis_kamar']);
$pembayaran = new Pembayaran;
$pembayaran->nama = $request->nama;
$pembayaran->jenis_kamar = $request->jenis_kamar;
$pembayaran->lama_menginap = $request->lama_menginap;
$pembayaran->kontak = $request->kontak;
$pembayaran->total_harga = $data[0]->harga_kamar * $request->jumlah_kamar * $request->lama_menginap;
$pembayaran->jumlah_kamar = $request->jumlah_kamar;
$pembayaran->check_in = Carbon::parse($request->check_in)->format('Y-m-d');
$pembayaran->check_out = Carbon::parse($request->check_out)->format('Y-m-d');
$pembayaran->save();
return redirect()->route('pembayaran.index')->with('info','Data berhasil ditambahkan');
}
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
$pembayaran = Pembayaran::findOrFail($id);
return view('pembayaran.show', compact('pembayaran'));
}
public function edit($id)
{
$pembayaran = Pembayaran::findOrFail($id);
return view('pembayaran.edit', compact('pembayaran'));
}
public function update(Request $request, $id)
{
$this->validate($request,['nama'=> 'required','jenis_kamar'=> 'required', 'lama_menginap' => 'required', 'kontak' => 'required', 'jumlah_kamar' => 'required', 'check_in' => 'required', 'check_out' => 'required',]);
$data = DB::table('tbl_kamar')
->select('tbl_kamar.*')
->where('tbl_kamar.id' ,'=',$request['jenis_kamar'])
->get();
$pembayaran = pembayaran::findOrFail($id);
$pembayaran->nama = $request->nama;
$pembayaran->jenis_kamar = $request->jenis_kamar;
$pembayaran->lama_menginap = $request->lama_menginap;
$pembayaran->kontak = $request->kontak;
$pembayaran->total_harga = $data[0]->harga_kamar * $request->jumlah_kamar * $request->lama_menginap;
$pembayaran->jumlah_kamar = $request->jumlah_kamar;
$pembayaran->check_in = Carbon::parse($request->check_in)->format('Y-m-d');
$pembayaran->check_out = Carbon::parse($request->check_out)->format('Y-m-d');
$pembayaran->save();
return redirect()->route('pembayaran.index')->with('info','Data berhasil diubah');
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
$pembayaran = Pembayaran::findOrFail($id);
$pembayaran->delete();
return redirect()->route('pembayaran.index')->with('info','Data berhasil dihapus');
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Input;
use Validator;
use Response;
use Redirect;
use Session;
use App\Verifikasis_k_manager;
use Illuminate\Support\Facades\DB;
class Report_kController extends Controller {
public function index() {
$verifikasis_k_manager = DB::table('verifikasi_keuangan_manager')->paginate(10);
return view('verifikasiKeuanganManager.index',['verifikasis_k_manager' => $verifikasis_k_manager]);
}
public function create()
{
return view('verifikasiKeuanganManager.create');
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
$verifikasi_k = new verifikasis_k_manager;
return redirect()->route('verifikasiKeuanganManager.index')->with('alert-success','Data Hasbeen Saved');
}
public function multiple_upload() {
// getting all of the post data
$files = Input::file('images');
// Making counting of uploaded images
$file_count = count($files);
// start count how many uploaded
$uploadcount = 0;
foreach ($files as $file) {
$rules = array('file' => 'required'); //'required|mimes:png,gif,jpeg,txt,pdf,doc'
$validator = Validator::make(array('file'=> $file), $rules);
if($validator->passes()){
$destinationPath = 'verifikasis_k_manager'; // upload folder in public directory
$filename = $file->getClientOriginalName();
$upload_success = $file->move($destinationPath, $filename);
$uploadcount ++;
// save into database
$extension = $file->getClientOriginalExtension();
$entry = new verifikasis_k_manager();
$entry->mime = $file->getClientMimeType();
$entry->original_filename = $filename;
$entry->filename = $file->getFilename().'.'.$extension;
$entry->status = 'request';
$entry->save();
}
}
if($uploadcount == $file_count){
Session::flash('success', 'Upload successfully');
return Redirect::to('verifikasiKeuanganManager');
} else {
return Redirect::to('verifikasiKeuanganManager')->withInput()->withErrors($validator);
}
}
public function destroy($id)
{
$verifikasi_k = verifikasis_k_manager::findOrFail($id);
$verifikasi_k->delete();
return redirect()->route('verifikasiKeuanganManager.index')->with('alert-success','Data Hasbeen Deleted');
}
}
\ No newline at end of file
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Input;
use Validator;
use Response;
use Redirect;
use Session;
use App\Verifikasis_m_manager;
use Illuminate\Support\Facades\DB;
class Report_mController extends Controller {
public function index() {
$verifikasis_m_manager = DB::table('verifikasi_masalah_manager')->paginate(10);
return view('verifikasiMasalahManager.index',['verifikasis_m_manager' => $verifikasis_m_manager]);
}
public function create()
{
return view('verifikasiMasalahManager.create');
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
$this->validate($request,['nama'=> 'required',]);
$verifikasi_m = new verifikasis_m_manager;
$verifikasi_m->nama = $request->nama;
$verifikasi_m->save();
return redirect()->route('verifikasiMasalahManager.index')->with('alert-success','Data Hasbeen Saved');
}
public function multiple_upload() {
// getting all of the post data
$files = Input::file('images');
// Making counting of uploaded images
$file_count = count($files);
// start count how many uploaded
$uploadcount = 0;
foreach ($files as $file) {
$rules = array('file' => 'required'); //'required|mimes:png,gif,jpeg,txt,pdf,doc'
$validator = Validator::make(array('file'=> $file), $rules);
if($validator->passes()){
$destinationPath = 'verifikasis_m_manager'; // upload folder in public directory
$filename = $file->getClientOriginalName();
$upload_success = $file->move($destinationPath, $filename);
$uploadcount ++;
// save into database
$extension = $file->getClientOriginalExtension();
$entry = new verifikasis_m_manager();
$entry->mime = $file->getClientMimeType();
$entry->original_filename = $filename;
$entry->filename = $file->getFilename().'.'.$extension;
$entry->status = 'request';
$entry->save();
}
}
if($uploadcount == $file_count){
Session::flash('success', 'Upload successfully');
return Redirect::to('verifikasiMasalahManager');
} else {
return Redirect::to('verifikasiMasalahManager')->withInput()->withErrors($validator);
}
}
public function destroy($id)
{
$verifikasi_m = verifikasis_m_manager::findOrFail($id);
$verifikasi_m->delete();
return redirect()->route('verifikasiMasalahManager.index')->with('alert-success','Data Hasbeen Deleted');
}
}
\ No newline at end of file
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Input;
use Validator;
use Response;
use Redirect;
use Session;
use App\Verifikasis_p_manager;
use Illuminate\Support\Facades\DB;
class Report_pController extends Controller {
public function index() {
$verifikasis_p_manager = DB::table('verifikasi_pengunjung_manager')->paginate(10);
return view('verifikasiPengunjungManager.index',['verifikasis_p_manager' => $verifikasis_p_manager]);
}
public function create()
{
return view('verifikasiPengunjungManager.create');
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
$this->validate($request,['nama'=> 'required',]);
$verifikasi_p = new verifikasis_p_manager;
$verifikasi_p->nama = $request->nama;
$verifikasi_p->save();
return redirect()->route('verifikasiPengunjungManager.index')->with('alert-success','Data Hasbeen Saved');
}
public function multiple_upload() {
// getting all of the post data
$files = Input::file('images');
// Making counting of uploaded images
$file_count = count($files);
// start count how many uploaded
$uploadcount = 0;
foreach ($files as $file) {
$rules = array('file' => 'required'); //'required|mimes:png,gif,jpeg,txt,pdf,doc'
$validator = Validator::make(array('file'=> $file), $rules);
if($validator->passes()){
$destinationPath = 'verifikasis_p_manager'; // upload folder in public directory
$filename = $file->getClientOriginalName();
$upload_success = $file->move($destinationPath, $filename);
$uploadcount ++;
// save into database
$extension = $file->getClientOriginalExtension();
$entry = new verifikasis_p_manager();
$entry->mime = $file->getClientMimeType();
$entry->original_filename = $filename;
$entry->filename = $file->getFilename().'.'.$extension;
$entry->status = 'request';
$entry->save();
}
}
if($uploadcount == $file_count){
Session::flash('success', 'Upload successfully');
return Redirect::to('verifikasiPengunjungManager');
} else {
return Redirect::to('verifikasiPengunjungManager')->withInput()->withErrors($validator);
}
}
public function destroy($id)
{
$verifikasi_p = verifikasis_p_manager::findOrFail($id);
$verifikasi_p->delete();
return redirect()->route('verifikasiPengunjungManager.index')->with('alert-success','Data Hasbeen Deleted');
}
}
\ No newline at end of file
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Input;
use Validator;
use Response;
use Redirect;
use Session;
use App\Reportsee_k;
use Illuminate\Support\Facades\DB;
class Reportsee_kController extends Controller {
public function index() {
$verifikasis_k_manager = DB::table('verifikasi_keuangan_manager')->paginate(10);
return view('seeReportKeuanganManager.index',['verifikasis_k_manager' => $verifikasis_k_manager]);
}
public function edit($id)
{
// get the nerd
$verifikasis_k_manager = Reportsee_k::find($id);
//dd($verifikasis_k_manager);
return view('seeReportKeuanganManager.edit', compact('verifikasis_k_manager'));
}
public function update(Request $request, $id)
{
$this->validate($request,['status'=> 'required',]);
$verifikasis_k_manager = Reportsee_k::find($id);
$verifikasis_k_manager->status = $request->status;
$verifikasis_k_manager->save();
return redirect()->route('seeReportKeuanganManager.index')->with('alert-success','Data Hasbeen Saved');
}
}
\ No newline at end of file
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Input;
use Validator;
use Response;
use Redirect;
use Session;
use App\Reportsee_m;
use Illuminate\Support\Facades\DB;
class Reportsee_mController extends Controller {
public function index() {
$verifikasis_m_manager = DB::table('verifikasi_masalah_manager')->paginate(10);
return view('seeReportMasalahManager.index',['verifikasis_m_manager' => $verifikasis_m_manager]);
}
public function edit($id)
{
// get the nerd
$verifikasis_m_manager = Reportsee_m::find($id);
//dd($verifikasis_m_manager);
return view('seeReportMasalahManager.edit', compact('verifikasis_m_manager'));
}
public function update(Request $request, $id)
{
$this->validate($request,['status'=> 'required',]);
$verifikasis_m_manager = Reportsee_m::find($id);
$verifikasis_m_manager->status = $request->status;
$verifikasis_m_manager->save();
return redirect()->route('seeReportMasalahManager.index')->with('alert-success','Data Hasbeen Saved');
}
}
\ No newline at end of file
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Input;
use Validator;
use Response;
use Redirect;
use Session;
use App\Reportsee_p;
use Illuminate\Support\Facades\DB;
class Reportsee_pController extends Controller {
public function index() {
$verifikasis_p_manager = DB::table('verifikasi_pengunjung_manager')->paginate(10);
return view('seeReportPengunjungManager.index',['verifikasis_p_manager' => $verifikasis_p_manager]);
}
public function edit($id)
{
// get the nerd
$verifikasis_p_manager = Reportsee_p::find($id);
//dd($verifikasis_p_manager);
return view('seeReportPengunjungManager.edit', compact('verifikasis_p_manager'));
}
public function update(Request $request, $id)
{
$this->validate($request,['status'=> 'required',]);
$verifikasis_p_manager = Reportsee_p::find($id);
$verifikasis_p_manager->status = $request->status;
$verifikasis_p_manager->save();
return redirect()->route('seeReportPengunjungManager.index')->with('alert-success','Data Hasbeen Saved');
}
}
\ No newline at end of file
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Input;
use Validator;
use Response;
use Redirect;
use Session;
use App\UpLoadp;
use DB;
class UploadpController extends Controller {
public function index() {
$uploadp = DB::table('laporanPegawai')->paginate(10);
return view('laporanPegawai.index',['uploadp' => $uploadp]);
}
public function create()
{
return view('laporanPegawai.create');
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
$this->validate($request,['nama'=> 'required',]);
$laporanPegawai = new uploadp;
$laporanPegawai->nama = $request->nama;
$laporanPegawai->save();
return redirect()->route('laporanPegawai.index')->with('alert-success','Data Hasbeen Saved');
}
public function multiple_upload() {
// getting all of the post data
$files = Input::file('images');
// Making counting of uploaded images
$file_count = count($files);
// start count how many uploaded
$uploadcount = 0;
foreach ($files as $file) {
$rules = array('file' => 'required'); //'required|mimes:png,gif,jpeg,txt,pdf,doc'
$validator = Validator::make(array('file'=> $file), $rules);
if($validator->passes()){
$destinationPath = 'uploadp'; // upload folder in public directory
$filename = $file->getClientOriginalName();
$upload_success = $file->move($destinationPath, $filename);
$uploadcount ++;
// save into database
$extension = $file->getClientOriginalExtension();
$entry = new uploadp();
$entry->mime = $file->getClientMimeType();
$entry->original_filename = $filename;
$entry->filename = $file->getFilename().'.'.$extension;
$entry->save();
}
}
if($uploadcount == $file_count){
Session::flash('success', 'Upload successfully');
return Redirect::to('laporanPegawai');
} else {
return Redirect::to('laporanPegawai')->withInput()->withErrors($validator);
}
}
public function destroy($id)
{
$laporanPegawai = Uploadp::findOrFail($id);
$laporanPegawai->delete();
return redirect()->route('laporanPegawai.index')->with('alert-success','Data Hasbeen Deleted');
}
}
\ No newline at end of file
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Input;
use Validator;
use Response;
use Redirect;
use Session;
use App\UpLoadrk;
use DB;
class UploadrkController extends Controller {
public function index() {
$uploadrk = DB::table('laporanKeuanganReceptionist')->paginate(10);
return view('laporanKeuanganReceptionist.index',['uploadrk' => $uploadrk]);
}
public function create()
{
return view('laporanKeuanganReceptionist.create');
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
$this->validate($request,['nama'=> 'required',]);
$laporanKeuanganReceptionist = new uploadrk;
$laporanKeuanganReceptionist->nama = $request->nama;
$laporanKeuanganReceptionist->save();
return redirect()->route('laporanKeuanganReceptionist.index')->with('alert-success','Data Hasbeen Saved');
}
public function multiple_upload() {
// getting all of the post data
$files = Input::file('images');
// Making counting of uploaded images
$file_count = count($files);
// start count how many uploaded
$uploadcount = 0;
foreach ($files as $file) {
$rules = array('file' => 'required'); //'required|mimes:png,gif,jpeg,txt,pdf,doc'
$validator = Validator::make(array('file'=> $file), $rules);
if($validator->passes()){
$destinationPath = 'uploadrk'; // upload folder in public directory
$filename = $file->getClientOriginalName();
$upload_success = $file->move($destinationPath, $filename);
$uploadcount ++;
// save into database
$extension = $file->getClientOriginalExtension();
$entry = new uploadrk();
$entry->mime = $file->getClientMimeType();
$entry->original_filename = $filename;
$entry->filename = $file->getFilename().'.'.$extension;
$entry->save();
}
}
if($uploadcount == $file_count){
Session::flash('success', 'Upload successfully');
return Redirect::to('laporanKeuanganReceptionist');
} else {
return Redirect::to('laporanKeuanganReceptionist')->withInput()->withErrors($validator);
}
}
public function destroy($id)
{
$laporanKeuanganReceptionist = Uploadrk::findOrFail($id);
$laporanKeuanganReceptionist->delete();
return redirect()->route('laporanKeuanganReceptionist.index')->with('alert-success','Data Hasbeen Deleted');
}
}
\ No newline at end of file
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Input;
use Validator;
use Response;
use Redirect;
use Session;
use App\UpLoadrt;
use DB;
class UploadrtController extends Controller {
public function index() {
$uploadrt = DB::table('laporanTransaksiReceptionist')->paginate(10);
return view('laporanTransaksiReceptionist.index',['uploadrt' => $uploadrt]);
}
public function create()
{
return view('laporanTransaksiReceptionist.create');
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
$this->validate($request,['nama'=> 'required',]);
$laporanTransaksiReceptionist = new uploadrt;
$laporanTransaksiReceptionist->nama = $request->nama;
$laporanTransaksiReceptionist->save();
return redirect()->route('laporanTransaksiReceptionist.index')->with('alert-success','Data Hasbeen Saved');
}
public function multiple_upload() {
// getting all of the post data
$files = Input::file('images');
// Making counting of uploaded images
$file_count = count($files);
// start count how many uploaded
$uploadcount = 0;
foreach ($files as $file) {
$rules = array('file' => 'required'); //'required|mimes:png,gif,jpeg,txt,pdf,doc'
$validator = Validator::make(array('file'=> $file), $rules);
if($validator->passes()){
$destinationPath = 'uploadrt'; // upload folder in public directory
$filename = $file->getClientOriginalName();
$upload_success = $file->move($destinationPath, $filename);
$uploadcount ++;
// save into database
$extension = $file->getClientOriginalExtension();
$entry = new uploadrt();
$entry->mime = $file->getClientMimeType();
$entry->original_filename = $filename;
$entry->filename = $file->getFilename().'.'.$extension;
$entry->save();
}
}
if($uploadcount == $file_count){
Session::flash('success', 'Upload successfully');
return Redirect::to('laporanTransaksiReceptionist');
} else {
return Redirect::to('laporanTransaksiReceptionist')->withInput()->withErrors($validator);
}
}
public function destroy($id)
{
$laporanTransaksiReceptionist = Uploadrt::findOrFail($id);
$laporanTransaksiReceptionist->delete();
return redirect()->route('laporanTransaksiReceptionist.index')->with('alert-success','Data Hasbeen Deleted');
}
}
\ No newline at end of file
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Input;
use Validator;
use Response;
use Redirect;
use Session;
use App\Uploads;
use Illuminate\Support\Facades\DB;
class UploadsController extends Controller {
public function index() {
$uploads = DB::table('upload')->paginate(10);
return view('upload.index',['uploads' => $uploads]);
}
public function create()
{
return view('upload.create');
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
$this->validate($request,['nama'=> 'required',]);
$upload = new uploads;
$upload->nama = $request->nama;
$upload->save();
return redirect()->route('upload.index')->with('alert-success','Data Hasbeen Saved');
}
public function multiple_upload() {
// getting all of the post data
$files = Input::file('images');
// Making counting of uploaded images
$file_count = count($files);
// start count how many uploaded
$uploadcount = 0;
foreach ($files as $file) {
$rules = array('file' => 'required'); //'required|mimes:png,gif,jpeg,txt,pdf,doc'
$validator = Validator::make(array('file'=> $file), $rules);
if($validator->passes()){
$destinationPath = 'uploads'; // upload folder in public directory
$filename = $file->getClientOriginalName();
$upload_success = $file->move($destinationPath, $filename);
$uploadcount ++;
// save into database
$extension = $file->getClientOriginalExtension();
$entry = new Uploads();
$entry->mime = $file->getClientMimeType();
$entry->original_filename = $filename;
$entry->filename = $file->getFilename().'.'.$extension;
$entry->save();
}
}
if($uploadcount == $file_count){
Session::flash('success', 'Upload successfully');
return Redirect::to('upload');
} else {
return Redirect::to('upload')->withInput()->withErrors($validator);
}
}
public function destroy($id)
{
$upload = Uploads::findOrFail($id);
$upload->delete();
return redirect()->route('upload.index')->with('alert-success','Data Hasbeen Deleted');
}
}
\ No newline at end of file
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Input;
use Validator;
use Response;
use Redirect;
use Session;
use App\Uploadsee;
use DB;
class UploadseeController extends Controller
{
public function index() {
$uploads = DB::table('upload')->paginate(10);
return view('seeupload.index',['uploads' => $uploads]);
}
public function multiple_upload() {
// getting all of the post data
$files = Input::file('images');
// Making counting of uploaded images
$file_count = count($files);
// start count how many uploaded
$uploadcount = 0;
foreach ($files as $file) {
$rules = array('file' => 'required'); //'required|mimes:png,gif,jpeg,txt,pdf,doc'
$validator = Validator::make(array('file'=> $file), $rules);
if($validator->passes()){
$destinationPath = 'uploads'; // upload folder in public directory
$filename = $file->getClientOriginalName();
$upload_success = $file->move($destinationPath, $filename);
$uploadcount ++;
// save into database
$extension = $file->getClientOriginalExtension();
$entry = new Uploadsee();
$entry->mime = $file->getClientMimeType();
$entry->original_filename = $filename;
$entry->filename = $file->getFilename().'.'.$extension;
$entry->save();
}
}
if($uploadcount == $file_count){
Session::flash('success', 'Upload successfully');
return Redirect::to('seeupload');
} else {
return Redirect::to('seeupload')->withInput()->withErrors($validator);
}
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Input;
use Validator;
use Response;
use Redirect;
use Session;
use App\UploadseePegawai;
use DB;
class UploadseePegawaiController extends Controller
{
public function index() {
$uploadp = DB::table('laporanPegawai')->paginate(10);
return view('seeuploadPegawai.index',['uploadp' => $uploadp]);
}
public function multiple_upload() {
// getting all of the post data
$files = Input::file('images');
// Making counting of uploaded images
$file_count = count($files);
// start count how many uploaded
$uploadcount = 0;
foreach ($files as $file) {
$rules = array('file' => 'required'); //'required|mimes:png,gif,jpeg,txt,pdf,doc'
$validator = Validator::make(array('file'=> $file), $rules);
if($validator->passes()){
$destinationPath = 'uploadp'; // upload folder in public directory
$filename = $file->getClientOriginalName();
$upload_success = $file->move($destinationPath, $filename);
$uploadcount ++;
// save into database
$extension = $file->getClientOriginalExtension();
$entry = new Uploadsee();
$entry->mime = $file->getClientMimeType();
$entry->original_filename = $filename;
$entry->filename = $file->getFilename().'.'.$extension;
$entry->save();
}
}
if($uploadcount == $file_count){
Session::flash('success', 'Upload successfully');
return Redirect::to('seeuploadPegawai');
} else {
return Redirect::to('seeuploadPegawai')->withInput()->withErrors($validator);
}
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Input;
use Validator;
use Response;
use Redirect;
use Session;
use App\Uploadsee_rk;
use DB;
class Uploadsee_rkController extends Controller
{
public function index() {
$uploadrk = DB::table('laporanKeuanganReceptionist')->paginate(10);
return view('seeuploadReceptionistKeuangan.index',['uploadrk' => $uploadrk]);
}
public function multiple_upload() {
// getting all of the post data
$files = Input::file('images');
// Making counting of uploaded images
$file_count = count($files);
// start count how many uploaded
$uploadcount = 0;
foreach ($files as $file) {
$rules = array('file' => 'required'); //'required|mimes:png,gif,jpeg,txt,pdf,doc'
$validator = Validator::make(array('file'=> $file), $rules);
if($validator->passes()){
$destinationPath = 'uploadrk'; // upload folder in public directory
$filename = $file->getClientOriginalName();
$upload_success = $file->move($destinationPath, $filename);
$uploadcount ++;
// save into database
$extension = $file->getClientOriginalExtension();
$entry = new Uploadsee();
$entry->mime = $file->getClientMimeType();
$entry->original_filename = $filename;
$entry->filename = $file->getFilename().'.'.$extension;
$entry->save();
}
}
if($uploadcount == $file_count){
Session::flash('success', 'Upload successfully');
return Redirect::to('seeuploadReceptionistKeuangan');
} else {
return Redirect::to('seeuploadReceptionistKeuangan')->withInput()->withErrors($validator);
}
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Input;
use Validator;
use Response;
use Redirect;
use Session;
use App\Uploadsee_rt;
use DB;
class Uploadsee_rtController extends Controller
{
public function index() {
$uploadrt = DB::table('laporanTransaksiReceptionist')->paginate(10);
return view('seeuploadReceptionistTransaksi.index',['uploadrt' => $uploadrt]);
}
public function multiple_upload() {
// getting all of the post data
$files = Input::file('images');
// Making counting of uploaded images
$file_count = count($files);
// start count how many uploaded
$uploadcount = 0;
foreach ($files as $file) {
$rules = array('file' => 'required'); //'required|mimes:png,gif,jpeg,txt,pdf,doc'
$validator = Validator::make(array('file'=> $file), $rules);
if($validator->passes()){
$destinationPath = 'uploadrt'; // upload folder in public directory
$filename = $file->getClientOriginalName();
$upload_success = $file->move($destinationPath, $filename);
$uploadcount ++;
// save into database
$extension = $file->getClientOriginalExtension();
$entry = new Uploadsee();
$entry->mime = $file->getClientMimeType();
$entry->original_filename = $filename;
$entry->filename = $file->getFilename().'.'.$extension;
$entry->save();
}
}
if($uploadcount == $file_count){
Session::flash('success', 'Upload successfully');
return Redirect::to('seeuploadReceptionistTransaksi');
} else {
return Redirect::to('seeuploadReceptionistTransaksi')->withInput()->withErrors($validator);
}
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Auth;
class UserController extends Controller
{
//
public function profile(){
return view('profile', array('user' => Auth::user()));
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Input;
use Validator;
use Response;
use Redirect;
use Session;
use App\Verifikasis;
use Illuminate\Support\Facades\DB;
class VerifikasisController extends Controller {
public function index() {
$verifikasis = DB::table('verifikasi')->paginate(10);
return view('verifikasi.index',['verifikasis' => $verifikasis]);
}
public function create()
{
return view('verifikasi.create');
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
$this->validate($request,['nama'=> 'required',]);
$verifikasi = new verifikasis;
$verifikasi->nama = $request->nama;
$verifikasi->save();
return redirect()->route('verifikasi.index')->with('alert-success','Data Hasbeen Saved');
}
public function multiple_upload() {
// getting all of the post data
$files = Input::file('images');
// Making counting of uploaded images
$file_count = count($files);
// start count how many uploaded
$uploadcount = 0;
foreach ($files as $file) {
$rules = array('file' => 'required'); //'required|mimes:png,gif,jpeg,txt,pdf,doc'
$validator = Validator::make(array('file'=> $file), $rules);
if($validator->passes()){
$destinationPath = 'verifikasis'; // upload folder in public directory
$filename = $file->getClientOriginalName();
$upload_success = $file->move($destinationPath, $filename);
$uploadcount ++;
// save into database
$extension = $file->getClientOriginalExtension();
$entry = new verifikasis();
$entry->mime = $file->getClientMimeType();
$entry->original_filename = $filename;
$entry->filename = $file->getFilename().'.'.$extension;
$entry->save();
}
}
if($uploadcount == $file_count){
Session::flash('success', 'Upload successfully');
return Redirect::to('verifikasi');
} else {
return Redirect::to('verifikasi')->withInput()->withErrors($validator);
}
}
public function destroy($id)
{
$verifikasi = Verifikasis::findOrFail($id);
$verifikasi->delete();
return redirect()->route('verifikasi.index')->with('alert-success','Data Hasbeen Deleted');
}
}
\ No newline at end of file
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Input;
use Validator;
use Response;
use Redirect;
use Session;
use App\verifikasis_m;
use Illuminate\Support\Facades\DB;
class verifikasis_mController extends Controller {
public function index() {
$verifikasis_m = DB::table('verifikasi_masalah')->paginate(10);
return view('verifikasiMasalah.index',['verifikasis_m' => $verifikasis_m]);
}
public function create()
{
return view('verifikasiMasalah.create');
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
$this->validate($request,['nama'=> 'required',]);
$verifikasiMasalah = new verifikasis_m;
$verifikasiMasalah->nama = $request->nama;
$verifikasiMasalah->save();
return redirect()->route('verifikasiMasalah.index')->with('alert-success','Data Hasbeen Saved');
}
public function multiple_upload() {
// getting all of the post data
$files = Input::file('images');
// Making counting of uploaded images
$file_count = count($files);
// start count how many uploaded
$uploadcount = 0;
foreach ($files as $file) {
$rules = array('file' => 'required'); //'required|mimes:png,gif,jpeg,txt,pdf,doc'
$validator = Validator::make(array('file'=> $file), $rules);
if($validator->passes()){
$destinationPath = 'verifikasis_m'; // upload folder in public directory
$filename = $file->getClientOriginalName();
$upload_success = $file->move($destinationPath, $filename);
$uploadcount ++;
// save into database
$extension = $file->getClientOriginalExtension();
$entry = new verifikasis_m();
$entry->mime = $file->getClientMimeType();
$entry->original_filename = $filename;
$entry->filename = $file->getFilename().'.'.$extension;
$entry->save();
}
}
if($uploadcount == $file_count){
Session::flash('success', 'Upload successfully');
return Redirect::to('verifikasiMasalah');
} else {
return Redirect::to('verifikasiMasalah')->withInput()->withErrors($validator);
}
}
public function destroy($id)
{
$verifikasiMasalah = verifikasis_m::findOrFail($id);
$verifikasiMasalah->delete();
return redirect()->route('verifikasiMasalah.index')->with('alert-success','Data Hasbeen Deleted');
}
}
\ No newline at end of file
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Input;
use Validator;
use Response;
use Redirect;
use Session;
use App\verifikasis_p;
use Illuminate\Support\Facades\DB;
class verifikasis_pController extends Controller {
public function index() {
$verifikasis_p = DB::table('verifikasi_pengunjung')->paginate(10);
return view('verifikasiPengunjung.index',['verifikasis_p' => $verifikasis_p]);
}
public function create()
{
return view('verifikasiPengunjung.create');
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
$this->validate($request,['nama'=> 'required',]);
$verifikasiPengunjung = new verifikasis_p;
$verifikasiPengunjung->nama = $request->nama;
$verifikasiPengunjung->save();
return redirect()->route('verifikasiPengunjung.index')->with('alert-success','Data Hasbeen Saved');
}
public function multiple_upload() {
// getting all of the post data
$files = Input::file('images');
// Making counting of uploaded images
$file_count = count($files);
// start count how many uploaded
$uploadcount = 0;
foreach ($files as $file) {
$rules = array('file' => 'required'); //'required|mimes:png,gif,jpeg,txt,pdf,doc'
$validator = Validator::make(array('file'=> $file), $rules);
if($validator->passes()){
$destinationPath = 'verifikasis_p'; // upload folder in public directory
$filename = $file->getClientOriginalName();
$upload_success = $file->move($destinationPath, $filename);
$uploadcount ++;
// save into database
$extension = $file->getClientOriginalExtension();
$entry = new verifikasis_p();
$entry->mime = $file->getClientMimeType();
$entry->original_filename = $filename;
$entry->filename = $file->getFilename().'.'.$extension;
$entry->save();
}
}
if($uploadcount == $file_count){
Session::flash('success', 'Upload successfully');
return Redirect::to('verifikasiPengunjung');
} else {
return Redirect::to('verifikasiPengunjung')->withInput()->withErrors($validator);
}
}
public function destroy($id)
{
$verifikasiPengunjung = verifikasis_p::findOrFail($id);
$verifikasiPengunjung->delete();
return redirect()->route('verifikasiPengunjung.index')->with('alert-success','Data Hasbeen Deleted');
}
}
\ No newline at end of file
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Input;
use Validator;
use Response;
use Redirect;
use Session;
use App\Verifikasisee_k;
use Illuminate\Support\Facades\DB;
class Verifikasisee_kController extends Controller {
public function index() {
$verifikasis = DB::table('verifikasi')->paginate(10);
return view('seeverifikasiKeuangan.index',['verifikasis' => $verifikasis]);
}
}
\ No newline at end of file
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Input;
use Validator;
use Response;
use Redirect;
use Session;
use App\Verifikasisee_m;
use Illuminate\Support\Facades\DB;
class Verifikasisee_mController extends Controller {
public function index() {
$verifikasis_m = DB::table('verifikasi_masalah')->paginate(10);
return view('seeverifikasiMasalah.index',['verifikasis_m' => $verifikasis_m]);
}
}
\ No newline at end of file
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Input;
use Validator;
use Response;
use Redirect;
use Session;
use App\Verifikasisee_p;
use Illuminate\Support\Facades\DB;
class Verifikasisee_PController extends Controller {
public function index() {
$verifikasis_p = DB::table('verifikasi_pengunjung')->paginate(10);
return view('seeverifikasiPengunjung.index',['verifikasis_p' => $verifikasis_p]);
}
}
<?php
namespace App\Http\Controllers\backend;
use Illuminate\Http\Request;
use App\Http\Requests\reqAdm;
use App\Http\Controllers\Controller;
use App\Models\Administrasi;
use App\User;
class AdmCtrl extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
//
$this->data['title'] = 'Data administrasi';
$this->data['administrasi'] = Administrasi::orderBy('nip')->paginate(15);
return view('backend.administrasi.index',$this->data);
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
//
$this->data['title'] = 'Tambah Data administrasi';
$this->data['jabatan'] = ['Administrasi'];
return view('backend.administrasi.create',$this->data);
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(reqAdm $request)
{
//
$input = $request->all();
$input['user_id'] = User::create(['username' => $input['nip'],'password' => bcrypt($input['nip']),'role' => 'administrasi'])->id;
Administrasi::create($input);
return redirect()->route('administrasi.index')->with('info','administrasi Berhasil Ditambahkan');
}
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
//
$this->data['title'] = 'Edit Data administrasi';
$this->data['administrasi'] = Administrasi::find($id);
$this->data['jabatan'] = ['Administrasi'];
return view('backend.administrasi.edit',$this->data);
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
//
$input = $request->except('_method','_token','mhs_id');
$mhs = Administrasi::find($id);
$mhs->update($input);
$input['user_id'] = User::find($mhs->user_id)->update(['username' => $input['nip'],'password' => bcrypt($input['nip']),'role' => 'administrasi']);
return redirect()->route('administrasi.index')->with('info','Data administrasi berhasil diubah');
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
//
$nilai = Administrasi::find($id);
$nilai->delete();
return redirect()->route('administrasi.index')->with('info','Data administrasi berhasil dihapus');
}
}
<?php
namespace App\Http\Controllers\backend;
use Illuminate\Http\Request;
use App\Http\Requests\reqGm;
use App\Http\Controllers\Controller;
use App\Models\Gmaster;
use App\User;
class GmCtrl extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
//
$this->data['title'] = 'Data master';
$this->data['gmaster'] = Gmaster::orderBy('nip')->paginate(15);
return view('backend.gmaster.index',$this->data);
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
//
$this->data['title'] = 'Tambah Data master';
$this->data['jabatan'] = ['Master'];
return view('backend.gmaster.create',$this->data);
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(reqGm $request)
{
//
$input = $request->all();
$input['user_id'] = User::create(['username' => $input['nip'],'password' => bcrypt($input['nip']),'role' => 'gmaster'])->id;
Gmaster::create($input);
return redirect()->route('gmaster.index')->with('info','Master Berhasil Ditambahkan');
}
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
//
$this->data['title'] = 'Edit Data master';
$this->data['gmaster'] = Gmaster::find($id);
$this->data['jabatan'] = ['Master'];
return view('backend.gmaster.edit',$this->data);
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
//
$input = $request->except('_method','_token','mhs_id');
$mhs = Gmaster::find($id);
$mhs->update($input);
$input['user_id'] = User::find($mhs->user_id)->update(['username' => $input['nip'],'password' => bcrypt($input['nip']),'role' => 'gmaster']);
return redirect()->route('gmaster.index')->with('info','Data master berhasil diubah');
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
//
$nilai = Gmaster::find($id);
$nilai->delete();
return redirect()->route('gmaster.index')->with('info','Data master berhasil dihapus');
}
}
<?php
namespace App\Http\Controllers\backend;
use Illuminate\Http\Request;
use App\Http\Requests\reqPgw;
use App\Http\Controllers\Controller;
use App\Models\Pegawai;
use App\User;
class PgwCtrl extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
//
$this->data['title'] = 'Data pegawai';
$this->data['pegawai'] = Pegawai::orderBy('nip')->paginate(15);
return view('backend.pegawai.index',$this->data);
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
//
$this->data['title'] = 'Tambah Data pegawai';
$this->data['jabatan'] = ['Pegawai'];
return view('backend.pegawai.create',$this->data);
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(reqPgw $request)
{
//
$input = $request->all();
$input['user_id'] = User::create(['username' => $input['nip'],'password' => bcrypt($input['nip']),'role' => 'pegawai'])->id;
Pegawai::create($input);
return redirect()->route('pegawai.index')->with('info','pegawai Berhasil Ditambahkan');
}
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
//
$this->data['title'] = 'Edit Data pegawai';
$this->data['pegawai'] = Pegawai::find($id);
$this->data['jabatan'] = ['Pegawai'];
return view('backend.pegawai.edit',$this->data);
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
//
$input = $request->except('_method','_token','mhs_id');
$mhs = Pegawai::find($id);
$mhs->update($input);
$input['user_id'] = User::find($mhs->user_id)->update(['username' => $input['nip'],'password' => bcrypt($input['nip']),'role' => 'pegawai']);
return redirect()->route('pegawai.index')->with('info','Data pegawai berhasil diubah');
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
//
$nilai = Pegawai::find($id);
$nilai->delete();
return redirect()->route('pegawai.index')->with('info','Data pegawai berhasil dihapus');
}
}
<?php
namespace App\Http\Controllers\backend;
use Illuminate\Http\Request;
use App\Http\Requests\reqRct;
use App\Http\Controllers\Controller;
use App\Models\Receptionist;
use App\User;
class RctCtrl extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
//
$this->data['title'] = 'Data receptionist';
$this->data['receptionist'] = Receptionist::orderBy('nip')->paginate(10);
return view('backend.receptionist.index',$this->data);
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
//
$this->data['title'] = 'Tambah Data receptionist';
$this->data['jabatan'] = ['Receptionist'];
return view('backend.receptionist.create',$this->data);
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(reqRct $request)
{
//
$input = $request->all();
$input['user_id'] = User::create(['username' => $input['nip'],'password' => bcrypt($input['nip']),'role' => 'receptionist'])->id;
Receptionist::create($input);
return redirect()->route('receptionist.index')->with('info','receptionist Berhasil Ditambahkan');
}
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
//
$this->data['title'] = 'Edit Data receptionist';
$this->data['receptionist'] = Receptionist::find($id);
$this->data['jabatan'] = ['Receptionist'];
return view('backend.receptionist.edit',$this->data);
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
//
$input = $request->except('_method','_token','mhs_id');
$mhs = Receptionist::find($id);
$mhs->update($input);
$input['user_id'] = User::find($mhs->user_id)->update(['username' => $input['nip'],'password' => bcrypt($input['nip']),'role' => 'receptionist']);
return redirect()->route('receptionist.index')->with('info','Data receptionist berhasil diubah');
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
//
$nilai = Receptionist::find($id);
$nilai->delete();
return redirect()->route('receptionist.index')->with('info','Data receptionist berhasil dihapus');
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Pembayaran;
use Carbon\Carbon;
use Illuminate\Support\Facades\DB ;
class laporanKeuanganController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$search = \Request::get('search');
$pembayarans = Pembayaran::where('nama','like','%'.$search.'%')->orderBy('id')->paginate(10);
$total = 0;
foreach ($pembayarans as $pembayaran) {
$total += $pembayaran->total_harga;
}
return view('laporanKeuangan.index',['pembayarans' => $pembayarans, 'total' => $total]);
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Pembayaran;
use Carbon\Carbon;
use Illuminate\Support\Facades\DB ;
class laporanPengunjungController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$search = \Request::get('search');
$pembayarans = Pembayaran::where('nama','like','%'.$search.'%')->orderBy('id')->paginate(10);
$total = 0;
$no=0;
foreach ($pembayarans as $pembayaran) {
$total += $no++;
}
return view('laporanPengunjung.index',['pembayarans' => $pembayarans, 'total' => $total]);
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
}
<?php
namespace App\Http;
use Illuminate\Foundation\Http\Kernel as HttpKernel;
class Kernel extends HttpKernel
{
/**
* The application's global HTTP middleware stack.
*
* These middleware are run during every request to your application.
*
* @var array
*/
protected $middleware = [
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
];
/**
* The application's route middleware groups.
*
* @var array
*/
protected $middlewareGroups = [
'web' => [
\App\Http\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\VerifyCsrfToken::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
],
'api' => [
'throttle:60,1',
'bindings',
],
];
/**
* The application's route middleware.
*
* These middleware may be assigned to groups or used individually.
*
* @var array
*/
protected $routeMiddleware = [
'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
'can' => \Illuminate\Auth\Middleware\Authorize::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'manager' => \App\Http\Middleware\Manager::class,
'pegawai' => \App\Http\Middleware\Pegawai::class,
'receptionist' => \App\Http\Middleware\Receptionist::class,
'administrasi' => \App\Http\Middleware\Administrasi::class,
'gmaster' => \App\Http\Middleware\Gmaster::class,
];
}
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Facades\Auth;
class Administrasi
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
if(Auth::check()){
if(Auth::user()->role != 'administrasi'){
return abort(403, 'Unauthorized action.');
}
} else {
return redirect('/');
}
return $next($request);
}
}
<?php
namespace App\Http\Middleware;
use Illuminate\Cookie\Middleware\EncryptCookies as BaseEncrypter;
class EncryptCookies extends BaseEncrypter
{
/**
* The names of the cookies that should not be encrypted.
*
* @var array
*/
protected $except = [
//
];
}
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Facades\Auth;
class Gmaster
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
if(Auth::check()){
if(Auth::user()->role != 'gmaster'){
return abort(403, 'Unauthorized action.');
}
} else {
return redirect('/');
}
return $next($request);
}
}
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Facades\Auth;
class Manager
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
if(Auth::check()){
if(Auth::user()->role != 'manager'){
return abort(403, 'Unauthorized action.');
}
} else {
return redirect('/');
}
return $next($request);
}
}
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Facades\Auth;
class Pegawai
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
if(Auth::check()){
if(Auth::user()->role != 'pegawai'){
return abort(403, 'Unauthorized action.');
}
} else {
return redirect('/');
}
return $next($request);
}
}
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Facades\Auth;
class Receptionist
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
if(Auth::check()){
if(Auth::user()->role != 'receptionist'){
return abort(403, 'Unauthorized action.');
}
} else {
return redirect('/');
}
return $next($request);
}
}
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Facades\Auth;
class RedirectIfAuthenticated
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param string|null $guard
* @return mixed
*/
public function handle($request, Closure $next, $guard = null)
{
if (Auth::guard($guard)->check()) {
if(Auth::user()->role == 'manager')
return redirect('manager');
}
return $next($request);
}
}
<?php
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as BaseVerifier;
class VerifyCsrfToken extends BaseVerifier
{
/**
* The URIs that should be excluded from CSRF verification.
*
* @var array
*/
protected $except = [
//
];
}
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Http\Request;
class reqAdm extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules(Request $request)
{
return [
//
'nip' => 'required|unique:tbl_administrasi,nip,'.$request->input('mhs_id'),
'tahun_masuk' => 'required|date_format:"Y"',
'nama_administrasi' => 'required'
];
}
public function messages(){
return [
'nip.required' => 'NIP harus diisi',
'nip.unique' => 'NIP sudah terdaftar',
'tahun_masuk.required' => 'tahun_masuk harus diisi',
'tahun_masuk.date_format' => 'Format tahun_masuk harus berupa tahun',
'nama_administrasi.required' => 'Nama administrasi harus diisi'
];
}
}
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Http\Request;
class reqGm extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules(Request $request)
{
return [
//
'nip' => 'required|unique:tbl_gmaster,nip,'.$request->input('mhs_id'),
'nama_gmaster' => 'required'
];
}
public function messages(){
return [
'nip.required' => 'NIP harus diisi',
'nip.unique' => 'NIP sudah terdaftar',
'nama_gmaster.required' => 'Nama master harus diisi'
];
}
}
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Http\Request;
class reqPgw extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules(Request $request)
{
return [
//
'nip' => 'required|unique:tbl_pegawai,nip,'.$request->input('mhs_id'),
'tahun_masuk' => 'required|date_format:"Y"',
'nama_pegawai' => 'required'
];
}
public function messages(){
return [
'nip.required' => 'NIP harus diisi',
'nip.unique' => 'NIP sudah terdaftar',
'tahun_masuk.required' => 'tahun_masuk harus diisi',
'tahun_masuk.date_format' => 'Format tahun_masuk harus berupa tahun',
'nama_pegawai.required' => 'Nama pegawai harus diisi'
];
}
}
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Http\Request;
class reqRct extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules(Request $request)
{
return [
//
'nip' => 'required|unique:tbl_receptionist,nip,'.$request->input('mhs_id'),
'tahun_masuk' => 'required|date_format:"Y"',
'nama_receptionist' => 'required'
];
}
public function messages(){
return [
'nip.required' => 'Nip harus diisi',
'nip.unique' => 'Nip sudah terdaftar',
'tahun_masuk.required' => 'Tahun masuk harus diisi',
'tahun_masuk.date_format' => 'Format Tahun masuk harus berupa tahun',
'nama_receptionist.required' => 'Nama receptionist harus diisi'
];
}
}
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Kamar extends Model
{
protected $table = "tbl_kamar";
}
<?php
namespace App\Listeners;
use App\Events\SomeEvent;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
class EventListener
{
/**
* Create the event listener.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Handle the event.
*
* @param SomeEvent $event
* @return void
*/
public function handle(SomeEvent $event)
{
//
}
}
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Facades\DB;
class Administrasi extends Model
{
//
protected $table = 'tbl_administrasi';
protected $fillable = ['nip','nama_administrasi','tahun_masuk','jabatan','user_id'];
}
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Facades\DB;
class Gmaster extends Model
{
//
protected $table = 'tbl_gmaster';
protected $fillable = ['nip','nama_gmaster','jabatan','user_id'];
}
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Facades\DB;
class Pegawai extends Model
{
//
protected $table = 'tbl_pegawai';
protected $fillable = ['nip','nama_pegawai','tahun_masuk','jabatan','user_id'];
}
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Facades\DB;
class Receptionist extends Model
{
//
protected $table = 'tbl_receptionist';
protected $fillable = ['nip','nama_receptionist','tahun_masuk','jabatan','user_id'];
}
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Pembayaran extends Model
{
protected $table = "tbl_transaksi";
protected $fillable=[
'no',
'nama',
'jenis_kamar',
'lama_menginap',
'kontak',
'total_harga',
'jumlah_kamar',
'check_in',
'check_out',
];
public $timestamps = false;
}
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Pengunjung extends Model
{
protected $table = "tbl_pengunjung";
protected $fillable=[
'no',
'kode_pemesanan',
'nama',
'jenis_kamar',
'kontak',
'check_in',
'check_out',
];
public $timestamps=false;
}
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
//
}
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}
}
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Gate;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
class AuthServiceProvider extends ServiceProvider
{
/**
* The policy mappings for the application.
*
* @var array
*/
protected $policies = [
'App\Model' => 'App\Policies\ModelPolicy',
];
/**
* Register any authentication / authorization services.
*
* @return void
*/
public function boot()
{
$this->registerPolicies();
//
}
}
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Broadcast;
class BroadcastServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
Broadcast::routes();
/*
* Authenticate the user's personal channel...
*/
Broadcast::channel('App.User.*', function ($user, $userId) {
return (int) $user->id === (int) $userId;
});
}
}
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Event;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
class EventServiceProvider extends ServiceProvider
{
/**
* The event listener mappings for the application.
*
* @var array
*/
protected $listen = [
'App\Events\SomeEvent' => [
'App\Listeners\EventListener',
],
];
/**
* Register any events for your application.
*
* @return void
*/
public function boot()
{
parent::boot();
//
}
}
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Route;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
class RouteServiceProvider extends ServiceProvider
{
/**
* This namespace is applied to your controller routes.
*
* In addition, it is set as the URL generator's root namespace.
*
* @var string
*/
protected $namespace = 'App\Http\Controllers';
/**
* Define your route model bindings, pattern filters, etc.
*
* @return void
*/
public function boot()
{
//
parent::boot();
}
/**
* Define the routes for the application.
*
* @return void
*/
public function map()
{
$this->mapWebRoutes();
$this->mapApiRoutes();
//
}
/**
* Define the "web" routes for the application.
*
* These routes all receive session state, CSRF protection, etc.
*
* @return void
*/
protected function mapWebRoutes()
{
Route::group([
'middleware' => 'web',
'namespace' => $this->namespace,
], function ($router) {
require base_path('routes/web.php');
});
}
/**
* Define the "api" routes for the application.
*
* These routes are typically stateless.
*
* @return void
*/
protected function mapApiRoutes()
{
Route::group([
'middleware' => 'api',
'namespace' => $this->namespace,
'prefix' => 'api',
], function ($router) {
require base_path('routes/api.php');
});
}
}
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Reportsee_k extends Model {
// upload model
protected $table = 'verifikasi_keuangan_manager';
}
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Reportsee_m extends Model {
// upload model
protected $table = 'verifikasi_masalah_manager';
}
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Reportsee_p extends Model {
// upload model
protected $table = 'verifikasi_pengunjung_manager';
}
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Uploadp extends Model {
// upload model
protected $table = 'laporanPegawai';
}
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Uploadrk extends Model {
// upload model
protected $table = 'laporanKeuanganReceptionist';
}
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Uploadrt extends Model {
// upload model
protected $table = 'laporanTransaksiReceptionist';
}
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Uploads extends Model {
// upload model
protected $table = 'upload';
}
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Uploadsee extends Model
{
protected $table = 'upload';
}
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class UploadseePegawai extends Model
{
protected $table = 'laporanPegawai';
}
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Uploadsee_rk extends Model
{
protected $table = 'laporanKeuanganReceptionist';
}
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Uploadsee_rt extends Model
{
protected $table = 'laporanTransaksiReceptionist';
}
<?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'username', 'email', 'password','role'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
'password', 'remember_token',
];
protected $casts = [
'role' => 'string',
];
public function manager(){
return $this->belongsTo('App\Models\Manager','id','user_id');
}
public function pegawai(){
return $this->belongsTo('App\Models\Pegawai','id','user_id');
}
public function receptionist(){
return $this->belongsTo('App\Models\Receptionist','id','user_id');
}
public function administrasi(){
return $this->belongsTo('App\Models\Administrasi','id','user_id');
}
public function gmaster(){
return $this->belongsTo('App\Models\Gmaster','id','user_id');
}
}
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Verifikasis extends Model {
// upload model
protected $table = 'verifikasi';
}
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Verifikasis_k_manager extends Model {
// upload model
protected $table = 'verifikasi_keuangan_manager';
}
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Verifikasis_m extends Model {
// upload model
protected $table = 'verifikasi_masalah';
}
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Verifikasis_m_manager extends Model {
// upload model
protected $table = 'verifikasi_masalah_manager';
}
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Verifikasis_p extends Model {
// upload model
protected $table = 'verifikasi_pengunjung';
}
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Verifikasis_p_manager extends Model {
// upload model
protected $table = 'verifikasi_pengunjung_manager';
}
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Verifikasisee_k extends Model {
// upload model
protected $table = 'verifikasi';
}
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Verifikasisee_m extends Model {
// upload model
protected $table = 'verifikasi_masalah';
}
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Verifikasisee_p extends Model {
// upload model
protected $table = 'verifikasi_pengunjung';
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment