diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..8bd3f92 --- /dev/null +++ b/.htaccess @@ -0,0 +1 @@ +AddHandler application/x-httpd-php81 .php .php5 .php4 .php3 diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php new file mode 100644 index 0000000..2fb45ce --- /dev/null +++ b/app/Http/Controllers/AccountController.php @@ -0,0 +1,400 @@ + "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Pages"], ['name' => "Account Settings"]]; + + if ( auth()->user()->hasRole('super_admin') || auth()->user()->hasRole('admin')) { + $pageConfigs = [ + 'pageHeader' => false, + ]; + } else { + $pageConfigs = [ + 'pageHeader' => false, + 'mainLayoutType' => 'subscriber', + 'showMenu' => false + ]; + } + + $userMeta = []; + $userMetaRecords = UserMeta::where('user_id', auth()->user()->id)->get(); + foreach ($userMetaRecords as $meta) { + $userMeta[$meta->meta_key] = $meta->meta_value; + } + + $userAddress = auth()->user()->address('institution_address'); + + return view('account/index', [ + 'breadcrumbs' => $breadcrumbs, + 'pageConfigs' => $pageConfigs, + 'userMeta' => $userMeta, + 'userAddress' => $userAddress + ]); + } + + public function changePassword() + { + $user = auth()->user(); + + request()->validate([ + 'current_password' => [ + 'required', + function ($attribute, $value, $fail) use ($user) { + if (!Hash::check($value, $user->password)) { + $fail('Your current password is incorrect.'); + } + }, + ], + 'password' => 'required|min:6|confirmed', + ]); + + $user->password = bcrypt(request()->get('password')); + $user->save(); + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'message' => 'Password changed successfully', + 'title' => 'Congatulations!' + ]); + } + + public function changeEmail(Request $request) + { + $user = auth()->user(); + + request()->validate([ + 'email' => [ + 'required', + 'email', + 'confirmed', + 'unique:users,email,' . $user->id + ] + ]); + + $user->email_verified_at = null; + $user->email = request()->get('email'); + $user->save(); + + // Send Email verification + $request->user()->sendEmailVerificationNotification(); + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations!', + 'message' => 'Your email address has changed. Please verify your new email address.' + ]); + } + + public function subscribeToNewsletter(Request $request) + { + $request->validate([ + 'email' => 'required|email' + ]); + + try { + $user = auth()->user(); + Newsletter::subscribeOrUpdate( $request->email, ['FNAME'=> $user->name, 'LNAME'=> $user->last_name] ); + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations!', + 'message' => 'You have subscribed to ' . config('app.name') . ' News & Events successfully.' + ]); + } catch(\Exception $e) { + logger("Mailchimp API Error: " . $e->getMessage()); + return response()->json([ + 'success' => false, + 'title' => 'Oops!', + 'message' => 'Something went wrong.' + ]); + } + } + + public function updateBasicInformation(Request $request) + { + $user = auth()->user(); + request()->validate([ + 'name' => 'required|string|max:255', + 'last_name' => 'required|string|max:255', + 'timezone' => 'required' + ]); + + $user->name = request()->get('name'); + $user->last_name = request()->get('last_name'); + $user->timezone = request()->get('timezone'); + $user->can_contact = $request->has('can_contact') ? true : false; + $user->save(); + + $user->updateOrCreateMeta(USER::EMAIL_NOTIFICATION, request()->has('email_notification') ? true : false); + $user->updateOrCreateMeta("areas_of_interest", json_encode($request->areas_of_interest ?? [])); + $user->updateOrCreateMeta(User::SUBSCRIBE_NEWSLETTER, $request->has('newsletter') ? 1 : 0); + $user->updateOrCreateMeta(User::EMAIL_NOTIFICATION, $request->has('email_notification') ? 1 : 0); + + try { + if($request->has('newsletter')) { + Newsletter::subscribeOrUpdate( $user->email, ['FNAME'=> $user->name, 'LNAME'=> $user->last_name] ); + } else { + Newsletter::unsubscribe($user->email); + } + } catch(\Exception $e) { + logger("Mailchimp API Error: " . $e->getMessage()); + } + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations!', + 'message' => 'Changes saved successfully.' + ]); + } + + public function institutionInfo(Request $request) + { + $user = auth()->user(); + + request()->validate([ + 'institution_name' => 'required|string|max:255', + 'department' => 'required|string|max:255', + 'street_name' => 'required|max:500', + 'city' => 'required|max:255', + 'state' => 'required|max:255', + 'postal_code' => 'required|max:255', + 'country' => 'required|max:255', + ]); + + $user->updateOrCreateMeta("institution_name", $request->institution_name); + $user->updateOrCreateMeta("department", $request->department); + + // Address + $user->updateOrCreateAddress("institution_address", [ + "street_name" => $request->street_name, + "city" => $request->city, + "state" => $request->state, + "postal_code" => $request->postal_code, + "country" => $request->country, + ]); + + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations!', + 'message' => 'Changes saved successfully.' + ]); + } + + public function setup(Request $request) + { + if (auth()->user()->subscribed('default')) { + return redirect(route('home')); + } + switch (request()->method()) { + case 'GET': + $pageConfigs = [ + 'bodyClass' => "bg-full-screen-image", + 'blankPage' => true + ]; + + $userMeta = []; + $userMetaRecords = UserMeta::where('user_id', auth()->user()->id)->get(); + foreach ($userMetaRecords as $meta) { + $userMeta[$meta->meta_key] = $meta->meta_value; + } + + $userAddress = auth()->user()->address('institution_address'); + + $membershipLevels = MembershipLevel::where('parent_id', 0)->get(); + + return view('/account/setup', [ + 'pageConfigs' => $pageConfigs, + 'userMeta' => $userMeta, + 'userAddress' => $userAddress, + 'membershipLevels' => $membershipLevels + ]); + + break; + + case 'POST': + + if (!auth()->user()->hasVerifiedEmail()) { + return response()->json([ + 'success' => false, + 'code' => 'error', + 'title' => 'Oops!', + 'message' => 'Your email address is not verified.', + ]); + } + $request->validate([ + 'institution_name' => 'required|string|max:255' + ]); + + $user = auth()->user(); + $user->can_contact = $request->has('can_contact') ? true : false; + $user->save(); + + $user->updateOrCreateMeta("institution_name", $request->institution_name); + $user->updateOrCreateMeta("department", $request->department); + $user->updateOrCreateMeta("areas_of_interest", json_encode($request->areas_of_interest ?? [])); + + $user->updateOrCreateMeta("hear_about_us", request()->has('hear_us_other') ? $request->hear_us_other : $request->hear_about_us); + $user->updateOrCreateMeta(User::SUBSCRIBE_NEWSLETTER, $request->has('newsletter') ? 1 : 0); + $user->updateOrCreateMeta(User::EMAIL_NOTIFICATION, $request->has('email_notification') ? 1 : 0); + + try { + if($request->has('newsletter')) { + Newsletter::subscribeOrUpdate( $user->email, ['FNAME'=> $user->name, 'LNAME'=> $user->last_name] ); + } else { + Newsletter::unsubscribe($user->email); + } + } catch(\Exception $e) { + logger("Mailchimp API Error " . $e->getMessage()); + } + + // Address + $user->updateOrCreateAddress("institution_address", [ + "street_name" => $request->street_name, + "city" => $request->city, + "state" => $request->state, + "postal_code" => $request->postal_code, + "country" => $request->country, + ]); + + $membershipLevels = []; + foreach (MembershipLevel::all()->toArray() as $record) { + $membershipLevels[$record['id']] = $record; + } + + // Membership Level + for ($i = 1; $i <= 3; $i++) { + $key = 'membership_level_' . $i; + + UserMeta::where([ + 'meta_key' => $key, + 'user_id' => $user->id + ])->delete(); + + $level = request()->get($key); + if (!empty($level)) { + $lastLevel = $level; + $value = $membershipLevels[$level]; + if ($membershipLevels[$level]['required_textbox']) { + $value['other_value'] = request()->get('membership_input_' . $level); + } + $user->updateOrCreateMeta($key, json_encode($value)); + } + } + + // Check if eligible for discount + $membershipLevel = MembershipLevel::find($lastLevel); + + $priceId = auth()->user()->getPriceId(); + + if($priceId == false) { + return response()->json([ + 'success' => false, + 'code' => 'error', + 'title' => 'Oops!', + 'message' => 'Please select your membership level.' + ]); + } + + $checkout = auth()->user()->newSubscription(Helper::SUBSCRIPTION_DEFAULT, $priceId) + ->allowPromotionCodes() + ->checkout([ + 'success_url' => route('home'), + 'cancel_url' => route('subscriber.setup'), + 'billing_address_collection' => 'required', + ]); + + + return view('inc/stripe/btn', compact('checkout')); + + break; + } + } + + public function membershipLevels($parentId) + { + return MembershipLevel::where('parent_id', $parentId)->get(); + } + + public function pendingAccount() + { + $pageConfigs = [ + 'bodyClass' => "bg-full-screen-image", + 'blankPage' => true + ]; + return view('account/pending', compact('pageConfigs')); + } + + public function applyAsPresenter(Request $request) + { + switch ($request->method()) { + case 'GET': + $user = auth()->user(); + $pageConfigs = ['blankPage' => true, 'mainLayoutType' => 'subscriber', 'showMenu' => false]; + $userMeta = []; + $userMetaRecords = UserMeta::where('user_id', $user->id)->get(); + foreach ($userMetaRecords as $meta) { + $userMeta[$meta->meta_key] = $meta->meta_value; + } + $userAddress = $user->address('institution_address'); + return view('content.presenters.apply', compact('user', 'userAddress', 'userMeta', 'pageConfigs')); + // return view('content.presenters.apply', [ + // 'user' => $user, + // 'userAddress' => $userAddress, + // 'userMeta' => $userMeta, + // 'pageConfigs' => $pageConfigs, + // ]); + break; + + case 'POST': + $request->validate([ + 'institution_name' => 'required|string|max:255', + 'department' => 'required|string|max:255', + 'about_presentation' => 'required|string', + ]); + + $user = auth()->user(); + + $user->updateOrCreateMeta("institution_name", $request->institution_name); + $user->updateOrCreateMeta("department", $request->department); + $user->updateOrCreateMeta("about_presentation", $request->about_presentation); + $user->updateOrCreateMeta("presentation_keywords", json_encode($request->presentation_keywords ?? [])); + + if ($request->has('is_published')) { + $user->updateOrCreateMeta("presentation_published_info", $request->presentation_published_info ?? ""); + } + + // Address + $user->updateOrCreateAddress("institution_address", [ + "street_name" => $request->street_name, + "city" => $request->city, + "state" => $request->state, + "postal_code" => $request->postal_code, + "country" => $request->country, + ]); + + $user->assignRole('presenter'); + + return redirect(route('user.account-pending')); + + break; + } + } +} diff --git a/app/Http/Controllers/ActivityController.php b/app/Http/Controllers/ActivityController.php new file mode 100644 index 0000000..bd04566 --- /dev/null +++ b/app/Http/Controllers/ActivityController.php @@ -0,0 +1,152 @@ + User::orderBy('name', 'asc')->get(), + ]); + } + + /** + * Display a listing of the resource. + * + * @return \Illuminate\Http\Response + */ + public function index() + { + $breadcrumbs = [ + ['link' => "admin.home", 'name' => "Dashboard"], ['name' => 'User Activities'] + ]; + + $pageConfigs = [ + //'pageHeader' => false, + //'contentLayout' => "content-left-sidebar", + ]; + + $records = Activity::where('id', '!=', 0); + if (request()->ajax()) { + + if (request()->has('user_id') && !empty(request()->get('user_id'))) { + $records->where('activity_log.causer_id', request()->get('user_id')); + } + + + return Datatables::of($records) + ->editColumn('created_at', function ($row) { + return date("d M Y h:i A", strtotime($row->created_at)); + }) + ->editColumn('description', function ($row) { + if (!is_null($row->subject_type) && !empty($row->subject_type)) { + $arr = explode("\\", $row->subject_type); + $on = $arr[count($arr) - 1]; + $on = ucfirst($on); + } else { + $on = ''; + } + return ucfirst($row->description) . ' ' . $on; + }) + ->editColumn('ip_address', function ($row) { + return $row->ip_address ?? "N/A"; + }) + ->editColumn('properties', function($row) { + if($row->properties == "[]") { + return "N/A"; + } + $link = route('super-admin.user_activities.show', $row->id); + return ""; + }) + ->addColumn('user', function ($row) { + if( is_null($row->causer_id)) { + return "N/A"; + } + $user = User::where('id', $row->causer_id)->first(); + if($user) { + return $user->fullName(); + } + return "N/A"; + }) + ->rawColumns(['user', 'properties']) + ->make(true); + } else { + return view('content.activities.index', compact('breadcrumbs', 'pageConfigs')); + } + } + + /** + * Show the form for creating a new resource. + * + * @return \Illuminate\Http\Response + */ + public function create() + { + // + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function store(Request $request) + { + // + } + + /** + * Display the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function show($id) + { + $record = Activity::findOrFail($id); + dd( json_decode($record->properties, true) ); + return view('content.activities.show', compact('record')); + } + + /** + * Show the form for editing the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function edit($id) + { + // + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param int $id + * @return \Illuminate\Http\Response + */ + public function update(Request $request, $id) + { + // + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function destroy($id) + { + // + } +} diff --git a/app/Http/Controllers/AdminController.php b/app/Http/Controllers/AdminController.php index e6ad977..6ebfc16 100644 --- a/app/Http/Controllers/AdminController.php +++ b/app/Http/Controllers/AdminController.php @@ -4,30 +4,80 @@ use Illuminate\Http\Request; use App\Models\Expense; +use App\Models\House; use App\Models\PaymentMode; +use App\Models\User; use Carbon\Carbon; +use App\Models\Activitylog; +use App\Models\Payment; +use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\DB; +use Illuminate\Support\Facades\Storage; +use League\Flysystem\Ftp\FtpAdapter; + class AdminController extends Controller { - - public function index() + public function index($id=0) { + $months = config('global.months'); if(isset($_GET['sort'])) { - $expenses= Expense::sort($_GET['sort']); + $expenses= Expense::sort($_GET['sort'], $_GET['start_date'], $_GET['end_date'],$_GET['month']); + $count = $expenses->count(); + $sum = $expenses->sum('amount'); } elseif(isset($_GET['search'])) { $expenses= Expense::search($_GET['search']); + $count = $expenses->count(); + $sum = $expenses->sum('amount'); + } + elseif(isset($_GET['start_date']) && isset($_GET['end_date'])) + { + $startdate = strtotime($_GET['start_date']); + $enddate = strtotime($_GET['end_date']); + + if ( $startdate == true && $enddate == true) { + $expenses = Expense::Datebetween($_GET['start_date'], $_GET['end_date']); + $count = $expenses->count(); + $sum = $expenses->sum('amount'); + } else { + return redirect()->route('expenses.index')->with('error','Invalid Request'); + } + } + elseif(isset($_GET['month'])) + { + + if($_GET['month']=='All') + { + $expenses = Expense::get(); + $count = $expenses->count(); + $sum = $expenses->sum('amount'); + } + else + { + $startdate = strtotime($_GET['month']); + + if ( $startdate == true) { + $expenses = Expense::Monthlyfilter($_GET['month']); + $count = $expenses->count(); + $sum = $expenses->sum('amount'); + } + else { + return redirect()->route('expenses.index')->with('error','Invalid Request'); + } + } } else { - $expenses= Expense::simplepaginate(15); + $expenses= Expense::Datebetween(Carbon::now()->startOfMonth(), Carbon::now()->endOfMonth()); + $count = $expenses->count(); + $sum = $expenses->sum('amount'); } - return view('admins.index', compact('expenses')); + return view('admins.index', compact('expenses','sum', 'count','id','months')); } - public function create() { $PaymentModes = PaymentMode::get(); @@ -37,44 +87,192 @@ public function create() public function store(Request $req) { + $messages = [ + 'payee.required' => 'The name field is required.', + 'payee.min' => 'The name field must be at least 3 characters.', + 'payee.max' => 'The name may not be greater than 255 characters.', + 'amount.required' => 'The amount field is required.', + 'amount.gt' => 'The amount field must be a number greater than zero .', + 'payment_modes_id.required' => 'The payment mode field is required.', + ]; $attributes= $req->validate([ 'payee' =>'required|min:3|max:255', 'amount' => 'required|gt:0', 'comments' => 'nullable', 'payment_modes_id' =>'required', 'dateofpayment' => 'required|date', - ]); + ], $messages); - Expense::create([ + $expense=Expense::create([ 'payee' => $attributes['payee'], 'amount' => $attributes['amount'], 'comments' => $attributes['comments'], 'payment_modes_id' =>$attributes['payment_modes_id'], 'dateofpayment' => Carbon::parse($attributes['dateofpayment'])->format('d-m-Y'), ]); + + // Activitylog::create([ + // 'user_id' => Auth::user()->id, + // 'action' => 'Created', + // 'module_id' => 2, + // 'module_item_id' => $expense->id + // ]); + return back()->with('success', 'Expenses Added Successfully'); } + public function report(Request $request) + { + $month = $request->input('month'); + + $houses = House::whereHas('payments', function($query) use ($month) { + $query->where('billingmonth', $month); + })->get()->toArray(); + + return ['houses' => $houses]; + } + + public function show(string $id) { // } - public function edit(string $id) + public function edit(Expense $expense) { - // + $PaymentModes = PaymentMode::get(); + + return view('admins.edit', compact('expense', 'PaymentModes')); } - public function update(Request $request, string $id) + public function update(Request $request, Expense $expense) { - // + $messages = [ + 'payee.required' => 'The name field is required.', + 'payee.min' => 'The name field must be at least 3 characters.', + 'payee.max' => 'The name may not be greater than 255 characters.', + 'amount.required' => 'The amount field is required.', + 'amount.gt' => 'The amount field must be a number greater than zero .', + 'payment_modes_id.required' => 'The payment mode field is required.', + ]; + $attributes= $request->validate([ + 'payee' =>'required|min:3|max:255', + 'amount' => 'required|gt:0', + 'comments' => 'nullable', + 'payment_modes_id' =>'required', + 'dateofpayment' => 'required|date', + ],$messages); + + $expense->update([ + 'payee' => $attributes['payee'], + 'amount' => $attributes['amount'], + 'comments' => $attributes['comments'], + 'payment_modes_id' =>$attributes['payment_modes_id'], + 'dateofpayment' => Carbon::parse($attributes['dateofpayment'])->format('d-m-Y'), + ]); + + // Activitylog::create([ + // 'user_id' => Auth::user()->id, + // 'action' => 'Updated', + // 'module_id' => 2, + // 'module_item_id' => $expense->id + // ]); + + return redirect()->route('expenses.index')->with('success', 'Expenses Updated Successfully'); } - public function destroy(string $id) + public function destroy(Expense $expense) { - // + abort_if(auth()->user()->usertype_id != User::ADMIN, 403, 'Access Deined'); + + // Activitylog::create([ + // 'user_id' => Auth::user()->id, + // 'action' => 'Deleted', + // 'module_id' => 2, + // 'module_item_id' => $expense->id + // ]); + + $expense->delete(); + + return back()->with('success','expense deleted successfully'); + } + + public function loginsertion() + { + // for payment done by mishra + $logs = DB::table('activity_logs')->where('module_id', 1)->where('user_id',198)->get(); + + foreach($logs as $log) + { + $data = [ + 'attributes' => Payment::where('id',$log->module_item_id)->first()->toarray() + ]; + + DB::table('activity_log')->insert([ + 'log_name' => 'default', + 'description' => 'created', + 'subject_type' => 'App\Models\Payment', + 'event' => 'created', + 'subject_id' => $log->module_item_id, + 'causer_type' => 'App\Models\User', + 'causer_id' => 198, + 'properties' => json_encode($data), + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + ]); + + } + + //for payment done by amod sir + $logs = DB::table('activity_logs')->where('module_id', 1)->where('user_id',175)->get(); + + foreach($logs as $log) + { + $data = [ + 'attributes' => Payment::where('id',$log->module_item_id)->first()->toarray() + ]; + + DB::table('activity_log')->insert([ + 'log_name' => 'default', + 'description' => 'created', + 'subject_type' => 'App\Models\Payment', + 'event' => 'created', + 'subject_id' => $log->module_item_id, + 'causer_type' => 'App\Models\User', + 'causer_id' => 175, + 'properties' => json_encode($data), + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + ]); + + } + + //foreaxpense + $logs = DB::table('activity_logs')->where('module_id', 2)->get(); + + foreach($logs as $log) + { + $data = [ + 'attributes' => Expense::where('id',$log->module_item_id)->first()->toarray() + ]; + + DB::table('activity_log')->insert([ + 'log_name' => 'default', + 'description' => 'created', + 'subject_type' => 'App\Models\Expense', + 'event' => 'created', + 'subject_id' => $log->module_item_id, + 'causer_type' => 'App\Models\User', + 'causer_id' => 198, + 'properties' => json_encode($data), + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + ]); + + } + } } diff --git a/app/Http/Controllers/AgoraRecordingController.php b/app/Http/Controllers/AgoraRecordingController.php new file mode 100644 index 0000000..c29ed4c --- /dev/null +++ b/app/Http/Controllers/AgoraRecordingController.php @@ -0,0 +1,113 @@ +token = $event->generateToken(); + + $uid = "123429836"; + + $uid = random_int(100000000, 999999999); + $uid = (string)$uid; + + $recording = new Recording(); + + // 1. Acquire Resource ID + $rid = $recording->acquire($event->channel_name, $uid); + + // 2. Start Recording + $r = $recording->start($event->channel_name, $uid, $event->token, $rid); + $rid = $r['resourceId'] ?? ""; + $sid = $r['sid'] ?? ""; + if( !empty($rid) && !empty($sid) ) { + // Save ResourceID, SID to database for finding recorded files later. + $eventRecording = EventRecording::create([ + 'event_id' => $event->id, + 'rid' => $r['resourceId'], + 'sid' => $r['sid'], + 'uid' => $uid, + 'status' => 'start', + ]); + return response()->json([ + 'success' => true, + 'body' => $r + ]); + } else { + + return response()->json([ + 'success' => false, + 'message' => $r + ]); + } + } + + public function status() + { + $recording = new Recording(); + $response = $recording->status( request()->get('rid'), request()->get('sid') ); + + $eventRecording = EventRecording::where([ + 'rid' => request()->get('rid'), + 'sid' => request()->get('sid'), + ])->first(); + + $eventRecording->file_lists = json_encode($response['serverResponse']); + $eventRecording->status = 'progress'; + $eventRecording->save(); + + return response()->json($response); + } + + public function stopRecording($id) + { + $event = Event::find($id); + + $eventRecording = EventRecording::where([ + 'rid' => request()->get('resourceId'), + 'sid' => request()->get('sid'), + 'event_id' => $event->id + ])->first(); + + $recording = new Recording(); + + $stopResponse = $recording->stop( + $event->channel_name, + $eventRecording->uid, + $eventRecording->rid, + $eventRecording->sid + ); + + $rid = $stopResponse['resourceId'] ?? ""; + $sid = $stopResponse['sid'] ?? ""; + if(!empty($rid) && !empty($sid) && isset($stopResponse['serverResponse'])) { + $eventRecording->file_lists = json_encode($stopResponse['serverResponse'] ?? null); + $eventRecording->status = 'stop'; + $eventRecording->save(); + + // Run save recording command. + \Artisan::call('event:save-recordings'); + } + return response()->json($stopResponse); + } + + public function saveRecordings() + { + \Artisan::call('event:save-recordings'); + echo \Artisan::output(); + } + +} diff --git a/app/Http/Controllers/ApiController.php b/app/Http/Controllers/ApiController.php new file mode 100644 index 0000000..93b78a0 --- /dev/null +++ b/app/Http/Controllers/ApiController.php @@ -0,0 +1,30 @@ + $data + // ]; + // } + + + public function footer() + { + $filePath = public_path('footercontent.txt'); + + $data = trim(file_get_contents($filePath)); + + return response()->json([ + "data" => $data + ]); + + } +} diff --git a/app/Http/Controllers/AppsController.php b/app/Http/Controllers/AppsController.php new file mode 100644 index 0000000..595cf1a --- /dev/null +++ b/app/Http/Controllers/AppsController.php @@ -0,0 +1,211 @@ + false]; + + return view('/content/apps/invoice/invoice-list', ['pageConfigs' => $pageConfigs]); + } + + // invoice preview App + public function invoice_preview() + { + $pageConfigs = ['pageHeader' => false]; + + return view('/content/apps/invoice/invoice-preview', ['pageConfigs' => $pageConfigs]); + } + + // invoice edit App + public function invoice_edit() + { + $pageConfigs = ['pageHeader' => false]; + + return view('/content/apps/invoice/invoice-edit', ['pageConfigs' => $pageConfigs]); + } + + // invoice edit App + public function invoice_add() + { + $pageConfigs = ['pageHeader' => false]; + + return view('/content/apps/invoice/invoice-add', ['pageConfigs' => $pageConfigs]); + } + + // invoice print App + public function invoice_print() + { + $pageConfigs = ['pageHeader' => false]; + + return view('/content/apps/invoice/invoice-print', ['pageConfigs' => $pageConfigs]); + } + + // User List Page + public function user_list() + { + $pageConfigs = ['pageHeader' => false]; + return view('/content/apps/user/app-user-list', ['pageConfigs' => $pageConfigs]); + } + + // User View Page + public function user_view() + { + $pageConfigs = ['pageHeader' => false]; + return view('/content/apps/user/app-user-view', ['pageConfigs' => $pageConfigs]); + } + + // User Edit Page + public function user_edit() + { + $pageConfigs = ['pageHeader' => false]; + return view('/content/apps/user/app-user-edit', ['pageConfigs' => $pageConfigs]); + } + + // Chat App + public function chatApp() + { + $pageConfigs = [ + 'pageHeader' => false, + 'contentLayout' => "content-left-sidebar", + 'pageClass' => 'chat-application', + ]; + + return view('/content/apps/chat/app-chat', [ + 'pageConfigs' => $pageConfigs + ]); + } + + // Calender App + public function calendarApp() + { + $pageConfigs = [ + 'pageHeader' => false + ]; + + return view('/content/apps/calendar/app-calendar', [ + 'pageConfigs' => $pageConfigs + ]); + } + + // Email App + public function emailApp() + { + $pageConfigs = [ + 'pageHeader' => false, + 'contentLayout' => "content-left-sidebar", + 'pageClass' => 'email-application', + ]; + + return view('/content/apps/email/app-email', ['pageConfigs' => $pageConfigs]); + } + // ToDo App + public function todoApp() + { + $pageConfigs = [ + 'pageHeader' => false, + 'contentLayout' => "content-left-sidebar", + 'pageClass' => 'todo-application', + ]; + + return view('/content/apps/todo/app-todo', [ + 'pageConfigs' => $pageConfigs + ]); + } + // File manager App + public function file_manager() + { + $pageConfigs = [ + 'pageHeader' => false, + 'contentLayout' => "content-left-sidebar", + 'pageClass' => 'file-manager-application', + ]; + + return view('/content/apps/fileManager/app-file-manager', ['pageConfigs' => $pageConfigs]); + } + + // Kanban App + public function kanbanApp() + { + $pageConfigs = [ + 'pageHeader' => false, + 'pageClass' => 'kanban-application', + ]; + + return view('/content/apps/kanban/app-kanban', ['pageConfigs' => $pageConfigs]); + } + + // Ecommerce Shop + public function ecommerce_shop() + { + $pageConfigs = [ + 'contentLayout' => "content-detached-left-sidebar", + 'pageClass' => 'ecommerce-application', + ]; + + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "eCommerce"], ['name' => "Shop"] + ]; + + return view('/content/apps/ecommerce/app-ecommerce-shop', [ + 'pageConfigs' => $pageConfigs, + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Ecommerce Details + public function ecommerce_details() + { + $pageConfigs = [ + 'pageClass' => 'ecommerce-application', + ]; + + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "eCommerce"], ['link' => "/app/ecommerce/shop", 'name' => "Shop"], ['name' => "Details"] + ]; + + return view('/content/apps/ecommerce/app-ecommerce-details', [ + 'pageConfigs' => $pageConfigs, + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Ecommerce Wish List + public function ecommerce_wishlist() + { + $pageConfigs = [ + 'pageClass' => 'ecommerce-application', + ]; + + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "eCommerce"], ['name' => "Wish List"] + ]; + + return view('/content/apps/ecommerce/app-ecommerce-wishlist', [ + 'pageConfigs' => $pageConfigs, + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Ecommerce Checkout + public function ecommerce_checkout() + { + $pageConfigs = [ + 'pageClass' => 'ecommerce-application', + ]; + + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "eCommerce"], ['name' => "Checkout"] + ]; + + return view('/content/apps/ecommerce/app-ecommerce-checkout', [ + 'pageConfigs' => $pageConfigs, + 'breadcrumbs' => $breadcrumbs + ]); + } +} diff --git a/app/Http/Controllers/Auth/ConfirmPasswordController.php b/app/Http/Controllers/Auth/ConfirmPasswordController.php new file mode 100644 index 0000000..9e93a1b --- /dev/null +++ b/app/Http/Controllers/Auth/ConfirmPasswordController.php @@ -0,0 +1,40 @@ +middleware('auth'); + } +} diff --git a/app/Http/Controllers/Auth/ForgotPasswordController.php b/app/Http/Controllers/Auth/ForgotPasswordController.php new file mode 100644 index 0000000..c288267 --- /dev/null +++ b/app/Http/Controllers/Auth/ForgotPasswordController.php @@ -0,0 +1,44 @@ +middleware('guest'); + } + + public function showLinkRequestForm(){ + $pageConfigs = [ + 'bodyClass' => "bg-full-screen-image", + 'blankPage' => true + ]; + + return view('/auth/passwords/email', [ + 'pageConfigs' => $pageConfigs + ]); + } +} diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php new file mode 100644 index 0000000..58ae08c --- /dev/null +++ b/app/Http/Controllers/Auth/LoginController.php @@ -0,0 +1,109 @@ +middleware('guest')->except('logout'); + } + + // Login + public function showLoginForm(){ + $pageConfigs = [ + 'bodyClass' => "bg-full-screen-image", + 'blankPage' => true + ]; + + return view('/auth/login', [ + 'pageConfigs' => $pageConfigs + ]); + } + + /** + * Log the user out of the application. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function logout(Request $request) + { + $this->guard()->logout(); + + $request->session()->invalidate(); + + return $this->loggedOut($request) ?: redirect('/login'); + } + + /** + * The user has been authenticated. + * + * @param \Illuminate\Http\Request $request + * @param mixed $user + * @return mixed + */ + protected function authenticated(Request $request, $user) + { + if($user->hasRole('presenter')) { + if(!$user->approved() || !$user->hasVerifiedEmail()) { + return redirect(route("user.account-pending")); + } + } + + + + } + + public function redirectTo() + { + if(auth()->user()->hasRole('super_admin')) { + return route('events.index'); + } + + if(auth()->user()->hasRole('admin')) { + return route('events.index'); + } + + if(auth()->user()->hasRole('subscriber') && auth()->user()->hasRole('presenter')) { + return route('home'); + } else if(auth()->user()->hasRole('presenter')) { + return route('presenter.events.index'); + } else { + return route('home'); + } + + } +} diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php new file mode 100644 index 0000000..0a35801 --- /dev/null +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -0,0 +1,170 @@ +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', 'string', 'max:255'], + 'last_name' => ['required', 'string', 'max:255'], + 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], + 'password' => ['required', 'string', 'min:8', 'confirmed'], + ], [ + 'email.unique' => 'There is an account associated with this email address. Click Here to sign in.
After Sign in, you will get the option to become a subscriber.' + ]); + } + + /** + * Create a new user instance after a valid registration. + * + * @param array $data + * @return \App\User + */ + protected function create(array $data) + { + + return User::create([ + 'name' => $data['name'], + 'last_name' => $data['last_name'], + 'email' => $data['email'], + 'password' => Hash::make($data['password']), + ]); + } + + // Register + public function showRegistrationForm() + { + $pageConfigs = ['blankPage' => true]; + + return view('/auth/register', [ + 'pageConfigs' => $pageConfigs + ]); + } + + public function showRegistrationFormPresenter() + { + $pageConfigs = ['blankPage' => true]; + + return view('/auth/become-a-presenter', [ + 'pageConfigs' => $pageConfigs + ]); + } + + /** + * Handle a registration request for the application. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\RedirectResponse|\Illuminate\Http\JsonResponse + */ + public function registerPresenter(Request $request) + { + $request->validate([ + 'name' => ['required', 'string', 'max:255'], + 'last_name' => ['required', 'string', 'max:255'], + 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], + 'password' => ['required', 'string', 'min:8'], + 'institution_name' => 'required|string|max:255', + 'department' => 'required|string|max:255', + 'about_presentation' => 'required|string', + ], [ + 'email.unique' => 'There is an account associated with this email address. Click Here to sign in.' + ]); + + $user = new User; + $user->name = $request->name; + $user->last_name = $request->last_name; + $user->email = $request->email; + $user->password = Hash::make($request->password); + $user->save(); + + event(new Registered($user)); + + $user->updateOrCreateMeta("institution_name", $request->institution_name); + $user->updateOrCreateMeta("department", $request->department); + $user->updateOrCreateMeta("about_presentation", $request->about_presentation); + $user->updateOrCreateMeta("presentation_keywords", json_encode($request->presentation_keywords ?? [])); + + if($request->has('is_published')) { + $user->updateOrCreateMeta("presentation_published_info", $request->presentation_published_info ?? ""); + } + + // Address + $user->updateOrCreateAddress("institution_address", [ + "street_name" => $request->street_name, + "city" => $request->city, + "state" => $request->state, + "postal_code" => $request->postal_code, + "country" => $request->country, + ]); + + $user->syncRoles(['presenter']); + + $this->guard()->login($user); + + return redirect(route('home')); + + // return $request->wantsJson() + // ? new JsonResponse([], 201) + // : redirect($this->redirectPath()); + } + + /** + * The user has been registered. + * + * @param \Illuminate\Http\Request $request + * @param mixed $user + * @return mixed + */ + protected function registered(Request $request, $user) + { + $user->syncRoles(['subscriber']); + + } +} diff --git a/app/Http/Controllers/Auth/ResetPasswordController.php b/app/Http/Controllers/Auth/ResetPasswordController.php new file mode 100644 index 0000000..57992e5 --- /dev/null +++ b/app/Http/Controllers/Auth/ResetPasswordController.php @@ -0,0 +1,52 @@ +middleware('guest'); + } + + public function showResetForm(Request $request, $token = null) + { + $pageConfigs = [ + 'bodyClass' => "bg-full-screen-image", + 'blankPage' => true + ]; + return view('auth.passwords.reset')->with( + ['token' => $token, 'email' => $request->email, 'pageConfigs' => $pageConfigs] + ); + } +} diff --git a/app/Http/Controllers/Auth/VerificationController.php b/app/Http/Controllers/Auth/VerificationController.php new file mode 100644 index 0000000..aea9617 --- /dev/null +++ b/app/Http/Controllers/Auth/VerificationController.php @@ -0,0 +1,68 @@ +middleware('auth'); + $this->middleware('signed')->only('verify'); + $this->middleware('throttle:6,1')->only('verify', 'resend'); + } + + /** + * Show the email verification notice. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\RedirectResponse|\Illuminate\View\View + */ + public function show(Request $request) + { + $pageConfigs = [ + 'bodyClass' => "bg-full-screen-image", + 'blankPage' => true + ]; + return $request->user()->hasVerifiedEmail() + ? redirect($this->redirectPath()) + : view('auth.verify', compact('pageConfigs')); + } + + public function redirectTo() + { + if(auth()->user()->hasRole('subscriber') && !auth()->user()->subscribed('default')) { + return '/setup'; + } else { + return $this->redirectTo; + } + } +} diff --git a/app/Http/Controllers/AuthController.php b/app/Http/Controllers/AuthController.php new file mode 100644 index 0000000..26c5509 --- /dev/null +++ b/app/Http/Controllers/AuthController.php @@ -0,0 +1,104 @@ +validate([ + 'name' => 'required|string', + 'email' => 'required|string|email|unique:users', + 'password' => 'required|string|', + 'c_password' => 'required|same:password', + ]); + + $user = new User([ + 'name' => $request->name, + 'email' => $request->email, + 'password' => bcrypt($request->password) + ]); + if ($user->save()) { + return response()->json([ + 'message' => 'Successfully created user!' + ], 201); + } else { + return response()->json(['error' => 'Provide proper details']); + } + } + + /** + * Login user and create token + * + * @param [string] email + * @param [string] password + * @param [boolean] remember_me + * @return [string] access_token + * @return [string] token_type + * @return [string] expires_at + */ + public function login(Request $request) + { + $request->validate([ + 'email' => 'required|string|email', + 'password' => 'required|string', + 'remember_me' => 'boolean' + ]); + $credentials = request(['email', 'password']); + if (!Auth::attempt($credentials)) + return response()->json([ + 'message' => 'Unauthorized' + ], 401); + $user = $request->user(); + $tokenResult = $user->createToken('Personal Access Token'); + $token = $tokenResult->token; + if ($request->remember_me) + $token->expires_at = Carbon::now()->addWeeks(1); + $token->save(); + return response()->json([ + 'access_token' => $tokenResult->accessToken, + 'token_type' => 'Bearer', + 'expires_at' => Carbon::parse( + $tokenResult->token->expires_at + )->toDateTimeString() + ]); + } + + /** + * Logout user (Revoke the token) + * + * @return [string] message + */ + public function logout(Request $request) + { + $request->user()->token()->revoke(); + return response()->json([ + 'message' => 'Successfully logged out' + ]); + } + + /** + * Get the authenticated User + * + * @return [json] user object + */ + public function user(Request $request) + { + return response()->json($request->user()); + } +} diff --git a/app/Http/Controllers/AuthenticationController.php b/app/Http/Controllers/AuthenticationController.php new file mode 100644 index 0000000..76236c5 --- /dev/null +++ b/app/Http/Controllers/AuthenticationController.php @@ -0,0 +1,72 @@ + true]; + + return view('/content/authentication/auth-login-v1', ['pageConfigs' => $pageConfigs]); + } + + // Login v2 + public function login_v2() + { + $pageConfigs = ['blankPage' => true]; + + return view('/content/authentication/auth-login-v2', ['pageConfigs' => $pageConfigs]); + } + + // Register v1 + public function register_v1() + { + $pageConfigs = ['blankPage' => true]; + + return view('/content/authentication/auth-register-v1', ['pageConfigs' => $pageConfigs]); + } + + // Register v2 + public function register_v2() + { + $pageConfigs = ['blankPage' => true]; + + return view('/content/authentication/auth-register-v2', ['pageConfigs' => $pageConfigs]); + } + + // Forgot Password v1 + public function forgot_password_v1() + { + $pageConfigs = ['blankPage' => true]; + + return view('/content/authentication/auth-forgot-password-v1', ['pageConfigs' => $pageConfigs]); + } + + // Forgot Password v2 + public function forgot_password_v2() + { + $pageConfigs = ['blankPage' => true]; + + return view('/content/authentication/auth-forgot-password-v2', ['pageConfigs' => $pageConfigs]); + } + + // Reset Password + public function reset_password_v1() + { + $pageConfigs = ['blankPage' => true]; + + return view('/content/authentication/auth-reset-password-v1', ['pageConfigs' => $pageConfigs]); + } + + // Reset Password + public function reset_password_v2() + { + $pageConfigs = ['blankPage' => true]; + + return view('/content/authentication/auth-reset-password-v2', ['pageConfigs' => $pageConfigs]); + } +} diff --git a/app/Http/Controllers/CardsController.php b/app/Http/Controllers/CardsController.php new file mode 100644 index 0000000..4df085e --- /dev/null +++ b/app/Http/Controllers/CardsController.php @@ -0,0 +1,63 @@ + "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Card"], ['name' => "Basic Card"] + ]; + return view('/content/cards/card-basic', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Card Advance + public function card_advance() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Card"], ['name' => "Advance Card"] + ]; + return view('/content/cards/card-advance', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Card Statistics + public function card_statistics() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Card"], ['name' => "Statistics Cards"] + ]; + return view('/content/cards/card-statistics', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Card Analytics + public function card_analytics() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Card"], ['name' => "Analytics Cards"] + ]; + return view('/content/cards/card-analytics', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Card Actions + public function card_actions() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Card"], ['name' => "Card Actions"] + ]; + return view('/content/cards/card-actions', [ + 'breadcrumbs' => $breadcrumbs + ]); + } +} diff --git a/app/Http/Controllers/ChartsController.php b/app/Http/Controllers/ChartsController.php new file mode 100644 index 0000000..b018819 --- /dev/null +++ b/app/Http/Controllers/ChartsController.php @@ -0,0 +1,41 @@ + "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Charts & Maps"], ['name' => "Apex"] + ]; + return view('/content/charts-maps/chart-apex', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Chartjs Charts + public function chartjs() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Charts & Maps"], ['name' => "Chartjs"] + ]; + return view('/content/charts-maps/chart-chartjs', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Google Maps + public function maps_leaflet() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Maps"], ['name' => "Leaflet Maps"] + ]; + return view('/content/charts-maps/maps-leaflet', [ + 'breadcrumbs' => $breadcrumbs + ]); + } +} diff --git a/app/Http/Controllers/ComponentsController.php b/app/Http/Controllers/ComponentsController.php new file mode 100644 index 0000000..0e7ddcc --- /dev/null +++ b/app/Http/Controllers/ComponentsController.php @@ -0,0 +1,262 @@ + "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Alerts"] + ]; + return view('/content/components/component-alert', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component - Avatar + public function avatar() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Avatar"] + ]; + return view('/content/components/component-avatar', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Badges + public function badges() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Badges"] + ]; + return view('/content/components/component-badges', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Breadcrumbs + public function breadcrumbs() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Breadcrumbs"] + ]; + return view('/content/components/component-breadcrumbs', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Buttons + public function buttons() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Buttons"] + ]; + return view('/content/components/component-buttons', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Carousel + public function carousel() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Carousel"] + ]; + return view('/content/components/component-carousel', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Collapse + public function collapse() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Collapse"] + ]; + return view('/content/components/component-collapse', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component - Divider + public function divider() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Divider"] + ]; + return view('/content/components/component-divider', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Dropdowns + public function dropdowns() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Dropdowns"] + ]; + return view('/content/components/component-dropdowns', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component List Group + public function list_group() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "List Group"] + ]; + return view('/content/components/component-list-group', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Media Objects + public function media_objects() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Media Objects"] + ]; + return view('/content/components/component-media-objects', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Modals + public function modals() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Modals"] + ]; + return view('/content/components/component-modals', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Navs + public function navs() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Navs"] + ]; + return view('/content/components/component-navs', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Pagination + public function pagination() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Pagination"] + ]; + return view('/content/components/component-pagination', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Pill Badges + public function pill_badges() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Pill Badges"] + ]; + return view('/content/components/component-pill-badges', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Pills + public function pills() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Pills"] + ]; + return view('/content/components/component-pills', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Tabs + public function tabs() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Tabs"] + ]; + return view('/content/components/component-tabs', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + + // Component Tooltips + public function tooltips() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Tooltips"] + ]; + return view('/content/components/component-tooltips', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Popovers + public function popovers() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Popovers"] + ]; + return view('/content/components/component-popovers', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Progress + public function progress() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Progress"] + ]; + return view('/content/components/component-progress', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Spinner + public function spinner() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Spinner"] + ]; + return view('/content/components/component-spinner', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Timeline + public function timeline() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Timeline"] + ]; + return view('/content/components/component-timeline', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Toast + public function toast() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Toast"] + ]; + return view('/content/components/component-toast', [ + 'breadcrumbs' => $breadcrumbs + ]); + } +} diff --git a/app/Http/Controllers/CropImageController.php b/app/Http/Controllers/CropImageController.php new file mode 100644 index 0000000..67bc9c7 --- /dev/null +++ b/app/Http/Controllers/CropImageController.php @@ -0,0 +1,194 @@ +get('cp_img_path') != NULL ) { + $image = public_path("uploads/profile_pic/{$guard}/" . request()->get('cp_img_path'));// $_POST['cp_img_path'] = /assets/uploads/img_name.ext + $imgr->load($image); + + $imgX = intval($_POST['ic_x']); + $imgY = intval($_POST['ic_y']); + $imgW = intval($_POST['ic_w']); + $imgH = intval($_POST['ic_h']); + + $imgr->resize($imgW,$imgH,$imgX,$imgY); + + $imgr->save($image); + $record = auth($guard)->user(); + $record->profile_photo_path = request()->get('cp_img_path'); + $record->save(); + + echo 'get('cp_img_path') ) .'?t='.time().'" class="rounded mr-50" alt="profile image" height="80" + width="80"/>'; + } + + + } + + function uploadImage(Request $request, $guard) + { + + $id = Auth::guard($guard)->user()->id; + $validator = Validator::make( + $request->all(), + ['file' => 'required|image|mimes:jpeg,png,jpg,png,ico|max:2048'], + [ + 'file.mimes' => 'Only jpg, jpeg, png files are allowed', + 'file.max' => 'Image size must be less than 2MB.' + ] + ); + + if ($validator->fails()) { + echo "
You have following errors:
"; + echo "
"; + foreach($validator->errors()->all() as $error) { + echo "

" . $error . "

"; + } + echo "
"; + exit; + return response()->json([ + 'success' => false, + 'error' => $validator->errors()->all() + ]); + } + + $fileName = "{$guard}_" . $id . "_" . time() . "." . $request->file('file')->getClientOriginalExtension(); + + + $request->file('file')->move(public_path('uploads/profile_pic/' . $guard), $fileName); + echo '
'; + exit; + + } +} + + +class imageResizing +{ + + var $image; + var $image_type; + var $res; + + function load($filename) + { + + $image_info = getimagesize($filename); + + $this->image_type = $image_info[2]; + + if ($this->image_type == IMAGETYPE_JPEG) { + $this->image = imagecreatefromjpeg($filename); + $this->res = ".jpg"; + } elseif ($this->image_type == IMAGETYPE_GIF) { + $this->image = imagecreatefromgif($filename); + $this->res = ".gif"; + } elseif ($this->image_type == IMAGETYPE_PNG) { + $this->image = imagecreatefrompng($filename); + $this->res = ".png"; + } + } + + function save($filename, $image_type = IMAGETYPE_JPEG, $compression = 100, $permissions = null) + { + + if ($image_type == IMAGETYPE_JPEG) + imagejpeg($this->image, $filename, $compression); + + elseif ($image_type == IMAGETYPE_GIF) + imagegif($this->image, $filename); + + elseif ($image_type == IMAGETYPE_PNG) + imagepng($this->image, $filename); + + if ($permissions != null) + chmod($filename, $permissions); + } + + function output($image_type = IMAGETYPE_JPEG) + { + + if ($image_type == IMAGETYPE_JPEG) + imagejpeg($this->image); + + elseif ($image_type == IMAGETYPE_GIF) + imagegif($this->image); + + elseif ($image_type == IMAGETYPE_PNG) + imagepng($this->image); + } + + function getWidth() + { + return imagesx($this->image); + } + + function getHeight() + { + return imagesy($this->image); + } + + function resizeToHeight($height) + { + + $ratio = $height / $this->getHeight(); + + $width = $this->getWidth() * $ratio; + + $this->resize($width, $height); + } + function resizeToWidth($width) + { + + $ratio = $width / $this->getWidth(); + + $height = $this->getheight() * $ratio; + + $this->resize($width, $height); + } + function scale($scale) + { + + $width = $this->getWidth() * $scale / 100; + + $height = $this->getheight() * $scale / 100; + + $this->resize($width, $height); + } + function resize($width, $height, $x = 0, $y = 0) + { + + $new_image = imagecreatetruecolor($width, $height); + + //imagecopyresampled($new_image, $this->image, $x, $y, 0, 0, $width, $height, $this->getWidth(), $this->getHeight()); + imagecopy($new_image, $this->image, 0, 0, $x, $y, $width, $height); + /* + echo $x."
"; + echo $y."
"; + echo $width."
"; + echo $height."
"; + echo $this->getWidth()."
"; + echo $this->getHeight();*/ + + $this->image = $new_image; + } +} diff --git a/app/Http/Controllers/DashboardController.php b/app/Http/Controllers/DashboardController.php new file mode 100644 index 0000000..e0f258f --- /dev/null +++ b/app/Http/Controllers/DashboardController.php @@ -0,0 +1,85 @@ + false]; + + $stats['admins_count'] = User::role('admin')->count(); + $stats['presenters_count'] = User::role('presenter')->count(); + $stats['subscribers_count'] = User::role('subscriber')->count(); + $stats['events_count'] = Event::count(); + $stats['videos_count'] = Video::count(); + + return view('/content/dashboard/super_admin', ['pageConfigs' => $pageConfigs, 'stats' => $stats]); + } + + public function admin() + { + $pageConfigs = ['pageHeader' => false]; + + $stats['admins_count'] = User::role('admin')->count(); + $stats['presenters_count'] = User::role('presenter')->count(); + $stats['subscribers_count'] = User::role('subscriber')->count(); + $stats['events_count'] = Event::count(); + $stats['videos_count'] = Video::count(); + + return view('/content/dashboard/admin', ['pageConfigs' => $pageConfigs, 'stats' => $stats]); + } + + public function presenter() + { + + } + + + public function index() + { + $pageConfigs = [ + 'pageHeader' => false, + 'showMenu' => false, + 'mainLayoutType' => 'subscriber' + ]; + + if ( + ( auth()->user()->hasRole('presenter') && auth()->user()->hasRole('subscriber') ) + || + auth()->user()->hasRole('subscriber') + || + auth()->user()->hasRole('super_admin') + || + auth()->user()->hasRole('admin') + ) { + + $events = Event::where('status', 'publish') + ->orderBy('start_date_time', 'asc') + // ->where('start_date_time', '>=', date('Y-m-d H:i:s')) + ->limit(6)->get(); + + $videos = Video::where('status', 'publish') + ->limit(8)->get(); + + return view('/content/dashboard/subscriber', [ + 'pageConfigs' => $pageConfigs, 'mainLayoutType' => 'subscriber', + 'events' => $events, + 'videos' => $videos + ]); + } else if (auth()->user()->hasRole('presenter')) { + + return redirect(route('presenter.events.index')); + + } else { + + abort(403, "Access Denied"); + + } + } +} diff --git a/app/Http/Controllers/EventController.php b/app/Http/Controllers/EventController.php new file mode 100644 index 0000000..b400aff --- /dev/null +++ b/app/Http/Controllers/EventController.php @@ -0,0 +1,445 @@ +where('is_active', 1)->get()); + View::share('presenters', User::role(Helper::PRESENTER_ROLE)->where('profile_status', 'approved')->where('is_active', 1)->get()); + View::share('keywords', Keyword::all()); + } + + /** + * Display a listing of the resource. + * + * @return \Illuminate\Http\Response + */ + public function index() + { + + if (request()->ajax()) { + + if (auth()->user()->hasRole('super_admin')) { + $events = Event::with('user')->where('events.id', '<>', 0); + if (request()->get('view') == 'trash') { + $events->onlyTrashed(); + } + } else { + + if (request()->get('view') == 'trash') { + $events = Event::onlyTrashed()->leftJoin('event_user', 'event_user.event_id', '=', 'events.id') + ->where(function($query) { + $query->where('event_user.user_id', auth()->user()->id); + $query->orWhere('events.user_id', auth()->user()->id); + }); + + } else { + $events = Event::leftJoin('event_user', 'event_user.event_id', '=', 'events.id') + ->where(function($query) { + $query->where('event_user.user_id', auth()->user()->id); + $query->orWhere('events.user_id', auth()->user()->id); + }); + // ->where('event_user.user_id', auth()->user()->id) + // ->orWhere('events.user_id', auth()->user()->id); + } + + } + + + + if (request()->get('event_admin') != "") { + $events->where('user_id', request()->get('event_admin')); + } + + if (request()->get('event_status') != "") { + $events->where('status', request()->get('event_status')); + } + + + if (request()->get('view') == 'calendar') { + // Return data for Calendar + if (auth()->user()->hasRole('super_admin')) { + return Event::where('id', '<>', 0)->select('events.*', 'start_date_time as start')->get()->toJson(); + } else { + return Event::leftJoin('event_user', 'event_user.event_id', '=', 'events.id') + ->where('event_user.user_id', auth()->user()->id) + ->orWhere('events.user_id', auth()->user()->id) + ->select('events.*', 'events.start_date_time as start') + ->get()->toJson(); + } + } + + return datatables()->of($events) + ->editColumn('title', function ($event) { + $title = Helper::tooltip($event->title, 50); + $eventLink = route('subscriber.events.show', $event->id); + return "$title "; + }) + ->editColumn('created_at', function ($event) { + return Timezone::convertToLocal($event->created_at, 'd M Y'); + }) + ->editColumn('status', function ($event) { + return $event->statusHtml(); + }) + ->editColumn('start_date_time', function ($event) { + return Timezone::convertToLocal($event->start_date_time, 'd M Y h:i A'); + }) + ->addColumn('users', function ($event) { + if (isset($event->user->id)) { + if (auth()->user()->id == $event->user->id) { + return "Me"; + } else { + $user = $event->user; + return $event->user->fullName() . "
" . "{$user->email}"; + } + } else { + return "N/A"; + } + }) + ->addColumn('last_name', function($event) { + if(!isset($event->user->id)) { return "N/A"; } + return $event->user->last_name; + }) + ->addColumn('email', function($event) { + if(!isset($event->user->id)) { return "N/A"; } + return $event->user->email; + }) + ->addColumn('action', function ($event) { + $deleteUrl = route('events.destroy', $event->id); + + if ($event->trashed()) { + $url = route('events.restore', $event->id); + + return " + + + + + + "; + } else { + $url = route('events.edit', $event->id); + $liveUrl = route('live.event.index', $event->id); + + return " + + + + + Go Live + "; + } + }) + ->rawColumns(['action', 'is_active', 'users', 'status', 'title']) + ->make(true); + } else { + + $pageConfigs = ['pageHeader' => true]; + $breadcrumbs = [ + ['link' => "/", 'name' => "Dashboard"], + ['name' => "Events"] + ]; + return view('/content/events/manage/index', compact('breadcrumbs')); + } + } + + /** + * Show the form for creating a new resource. + * + * @return \Illuminate\Http\Response + */ + public function create() + { + return view('/content/events/manage/create'); + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function store(Request $request) + { + $request->validate($this->validationRules()); + + $event = new Event; + $event->user_id = auth()->user()->hasRole('super_admin') ? $request->user_id : auth()->user()->id; + $event->title = $request->title; + $event->start_date_time = Timezone::convertFromLocal($request->start_date_time); + $channelName = Str::slug($request->title, '-'); + $channelName = Str::limit($channelName, 10) . '_' . date('d_M_Y_H_i_s'); + $event->channel_name = $channelName; + $event->status = $request->status; + $event->save(); + + $event->users()->sync($request->users ?? []); + + $keywordIds = []; + + foreach($request->keywords as $keywordId) { + if(!is_numeric($keywordId)) { + $keyword = Keyword::create([ + 'keyword_name' => $keywordId, + ]); + $keywordId = $keyword->id; + } + + $keywordIds[] = $keywordId; + } + + $event->keywords()->sync($keywordIds ?? []); + + if ($request->hasFile('logo')) { + try { + $path = $request->file('logo')->store('public/event_images'); + $fileName = $request->file('logo')->getClientOriginalName(); + $extension = $request->file('logo')->extension(); + $file = new File; + $file->title = $fileName; + $file->location = $path; + $file->extension = $extension; + $file->save(); + + $event->logo_id = $file->id; + $event->save(); + } catch (\Exception $e) {} + } + + foreach($event->users ?? [] as $user) { + $user = User::find($user->id); + + try { + $user->notifyAt( + new PresenterEventReminder($event, $user), + Carbon::parse(Timezone::convertFromLocal($event->start_date_time)) + ); + } catch(\Exception $e) { + // Send date may be in advance. + } + + } + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Event created successfully.' + ]); + } + + /** + * Display the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function show($id) + { + $record = Event::findOrFail($id); + $record->start_date_time = Timezone::convertToLocal($record->start_date_time, 'd M Y h:i A'); + $record->token = $record->generateToken(); + return view('/content/events/manage/show', compact('record')); + } + + /** + * Show the form for editing the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function edit($id) + { + $record = Event::findOrFail($id); + $record->start_date_time = Timezone::convertToLocal($record->start_date_time, 'd M Y h:i A'); + return view('/content/events/manage/edit', compact('record')); + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param int $id + * @return \Illuminate\Http\Response + */ + public function update(Request $request, $id) + { + $event = Event::findOrFail($id); + $request->validate($this->validationRules([ + 'title' => 'required|max:255|unique:events,title,' . $id, + ])); + + $event->user_id = auth()->user()->hasRole('super_admin') ? $request->user_id : auth()->user()->id; + $event->title = $request->title; + $event->start_date_time = Timezone::convertFromLocal($request->start_date_time); + $event->status = $request->status; + $event->save(); + + + $keywordIds = []; + + foreach($request->keywords as $keywordId) { + if(!is_numeric($keywordId)) { + $keyword = Keyword::create([ + 'keyword_name' => $keywordId, + ]); + $keywordId = $keyword->id; + } + + $keywordIds[] = $keywordId; + } + + $event->keywords()->sync($keywordIds ?? []); + + if ($request->hasFile('logo')) { + $event->addOrUpdateLogo($request->file('logo')); + } + + foreach($event->users ?? [] as $user) { + $user = User::find($user->id); + + $record = ScheduledNotification::where( + 'notification', + Serializer::create()->serializeNotifiable(new PresenterEventReminder($event, $user)) + )->where([ + 'target_id' => $user->id, + 'target_type' => 'App\User' + ])->first(); + + if($record) { + $record->delete(); + } + } + + $event->users()->sync($request->users ?? []); + + foreach($event->users ?? [] as $user) { + $user = User::find($user->id); + + try { + $user->notifyAt( + new PresenterEventReminder($event, $user), + Carbon::parse(Timezone::convertFromLocal($event->start_date_time)) + ); + } catch(\Exception $e) { + // Send date may be in advance. + } + } + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Event information updated successfully.' + ]); + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function destroy($id) + { + $record = Event::withTrashed()->findOrFail($id); + if ($record->trashed()) { + if ($record->logo_id) { + $logo = File::find($record->logo_id); + $logoLocation = $logo->location; + } else { + $logoLocation = ""; + } + + $record->forceDelete(); + + if (!empty($logoLocation)) { + // Storage::delete($logoLocation); + $logo->delete(); + } + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Event permanently deleted successfully.' + ]); + } else { + $record->delete(); + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Event moved to trash successfully.' + ]); + } + } + + public function restore($id) + { + $record = Event::withTrashed()->findOrFail($id); + if ($record->trashed()) { + $record->restore(); + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Event restored successfully.' + ]); + } else { + return response()->json([ + 'message' => 'Not found' + ], 404); + } + } + + public function validationRules($overrideRule = []) + { + $rules = [ + 'title' => 'required|max:255|unique:events,title', + 'start_date_time' => 'required', + 'status' => 'required|in:' . implode(',', array_keys(config('setting.event_status'))), + 'logo' => 'image|nullable|max:5120' + ]; + return array_merge($rules, $overrideRule); + } +} diff --git a/app/Http/Controllers/EventRecordingController.php b/app/Http/Controllers/EventRecordingController.php new file mode 100644 index 0000000..9a88c8d --- /dev/null +++ b/app/Http/Controllers/EventRecordingController.php @@ -0,0 +1,85 @@ + "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Extensions"], ['name' => "Sweet Alerts"] + ]; + return view('/content/extensions/ext-component-sweet-alerts', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // block ui + public function block_ui() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Extensions"], ['name' => "BlockUI"] + ]; + return view('/content/extensions/ext-component-block-ui', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Toastr + public function toastr() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Extensions"], ['name' => "Toastr"] + ]; + return view('/content/extensions/ext-component-toastr', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // NoUi Slider + public function slider() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Extensions"], ['name' => "Sliders"] + ]; + return view('/content/extensions/ext-component-slider', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Drag Drop + public function drag_drop() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Extensions"], ['name' => "Drag & Drop"] + ]; + return view('/content/extensions/ext-component-drag-drop', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Tour + public function tour() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Extensions"], ['name' => "Tour"] + ]; + return view('/content/extensions/ext-component-tour', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Clipboard + public function clipboard() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Extensions"], ['name' => "Clipboard"] + ]; + return view('/content/extensions/ext-component-clipboard', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Media Player + public function plyr() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Extensions"], ['name' => "Media Player"] + ]; + return view('/content/extensions/ext-component-media-player', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Context Menu + public function context_menu() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Extensions"], ['name' => "Context Menu"] + ]; + return view('/content/extensions/ext-component-context-menu', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // swiper + public function swiper() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Extensions"], ['name' => "Swiper"] + ]; + return view('/content/extensions/ext-component-swiper', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // tree + public function tree() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Extensions"], ['name' => "Tree"] + ]; + return view('/content/extensions/ext-component-tree', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // ratings + public function ratings() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Extensions"], ['name' => "Ratings"] + ]; + return view('/content/extensions/ext-component-ratings', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // I18n + public function locale() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Extensions"], ['name' => "Locale"] + ]; + return view('/content/locale/locale', [ + 'breadcrumbs' => $breadcrumbs + ]); + } +} diff --git a/app/Http/Controllers/FormsController.php b/app/Http/Controllers/FormsController.php new file mode 100644 index 0000000..b7ac41a --- /dev/null +++ b/app/Http/Controllers/FormsController.php @@ -0,0 +1,185 @@ + "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Form Elements"], ['name' => "Input"] + ]; + return view('/content/forms/form-elements/form-input', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Form Elements - Input-groups + public function input_groups() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Form Elements"], ['name' => "Input Groups"] + ]; + return view('/content/forms/form-elements/form-input-groups', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Form Elements - Input-mask + public function input_mask() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Form Elements"], ['name' => "Input Mask"] + ]; + return view('/content/forms/form-elements/form-input-mask', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Form Elements - Textarea + public function textarea() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Form Elements"], ['name' => "Textarea"] + ]; + return view('/content/forms/form-elements/form-textarea', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Form Elements - Checkbox + public function checkbox() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Form Elements"], ['name' => "Checkbox"] + ]; + return view('/content/forms/form-elements/form-checkbox', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Form Elements - Radio + public function radio() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Form Elements"], ['name' => "Radio"] + ]; + return view('/content/forms/form-elements/form-radio', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Form Elements - Switch + public function switch() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Form Elements"], ['name' => "Switch"] + ]; + return view('/content/forms/form-elements/form-switch', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Form Elements - Select + public function select() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Form Elements"], ['name' => "Select"] + ]; + return view('/content/forms/form-elements/form-select', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + + + // Form Elements - Number Input + public function number_input() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Form Elements"], ['name' => "Number Input"] + ]; + return view('/content/forms/form-elements/form-number-input', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // File Uploader + public function file_uploader() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Form Elements"], ['name' => "File Uploader"] + ]; + return view('/content/forms/form-elements/form-file-uploader', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Quill Editor + public function quill_editor() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Form Elements"], ['name' => "Quill Editor"] + ]; + return view('/content/forms/form-elements/form-quill-editor', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Form Elements - Date & time Picker + public function date_time_picker() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Form Elements"], ['name' => "Date & Time Picker"] + ]; + return view('/content/forms/form-elements/form-date-time-picker', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Form Layouts + public function layouts() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Forms"], ['name' => "Form Layouts"] + ]; + return view('/content/forms/form-layout', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Form Wizard + public function wizard() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Forms"], ['name' => "Form Wizard"] + ]; + return view('/content/forms/form-wizard', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Form Validation + public function validation() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Forms"], ['name' => "Form Validation"] + ]; + return view('/content/forms/form-validation', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + // Form repeater + public function form_repeater() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Forms"], ['name' => "Form Repeater"] + ]; + return view('/content/forms/form-repeater', [ + 'breadcrumbs' => $breadcrumbs + ]); + } +} diff --git a/app/Http/Controllers/HouseController.php b/app/Http/Controllers/HouseController.php index ad438cb..0b74ca6 100644 --- a/app/Http/Controllers/HouseController.php +++ b/app/Http/Controllers/HouseController.php @@ -13,7 +13,14 @@ class HouseController extends Controller public function index() { - $houses = House::get(); + if(isset($_GET['search'])) + { + $houses = House::search($_GET['search']); + } + else + { + $houses = House::get(); + } return view('houses.index', compact('houses')); } diff --git a/app/Http/Controllers/KeywordController.php b/app/Http/Controllers/KeywordController.php new file mode 100644 index 0000000..77dd903 --- /dev/null +++ b/app/Http/Controllers/KeywordController.php @@ -0,0 +1,84 @@ +'en', 'fr'=>'fr','de'=>'de','pt'=>'pt']; + // check for existing language + if(array_key_exists($locale,$availLocale)){ + session()->put('locale',$locale); + } + return redirect()->back(); + } +} diff --git a/app/Http/Controllers/LiveEventController.php b/app/Http/Controllers/LiveEventController.php new file mode 100644 index 0000000..178b0c6 --- /dev/null +++ b/app/Http/Controllers/LiveEventController.php @@ -0,0 +1,33 @@ + 'boxed', + 'pageHeader' => false, + 'showMenu' => false, + 'verticalMenuNavbarType' => 'hidden', + 'pageClass' => 'chat-application', + 'footerType' => 'hidden' + // 'contentLayout' => "content-left-sidebar", + ]; + + if(auth()->user()->hasRole('presenter')) [ + $pageConfigs['mainLayoutType'] = 'subscriber' + ]; + + $event->token = $event->generateToken(); + return view('content/live/index', compact('event', 'pageConfigs')); + } +} diff --git a/app/Http/Controllers/LoginController.php b/app/Http/Controllers/LoginController.php index e88ed20..2e1e6df 100644 --- a/app/Http/Controllers/LoginController.php +++ b/app/Http/Controllers/LoginController.php @@ -14,28 +14,16 @@ public function login(Request $req) if (Auth::attempt($credentials)) { - $user = User::where('mobile1', $req['mobile1'])->first(); - if($user->usertype_id == User::ADMIN) - { - return redirect('home')->with('success', 'Welcome Admin'); - } - elseif($user->usertype_id == User::RESIDENT) - { - return redirect()->route('user.home') - ->with('success', 'Welcome Resident'); - } - else - { - return redirect('home') - ->with('success', 'Welcome Moderator'); - } + return redirect('/'); } return redirect('/')->with('error','Incorrect Password' ); } - public function logout() + public function logout(Request $request) { + $request->session()->put('logged_out', true); + Auth::logout(); return redirect('/'); diff --git a/app/Http/Controllers/MiscellaneousController.php b/app/Http/Controllers/MiscellaneousController.php new file mode 100644 index 0000000..2244c64 --- /dev/null +++ b/app/Http/Controllers/MiscellaneousController.php @@ -0,0 +1,42 @@ + true]; + + return view('/content/miscellaneous/page-coming-soon', ['pageConfigs' => $pageConfigs]); + } + + // Error + public function error() + { + $pageConfigs = ['blankPage' => true]; + + return view('/content/miscellaneous/error', ['pageConfigs' => $pageConfigs]); + } + + // Not-authorized + public function not_authorized() + { + $pageConfigs = ['blankPage' => true]; + + return view('/content/miscellaneous/page-not-authorized', ['pageConfigs' => $pageConfigs]); + } + + // Maintenance + public function maintenance() + { + $pageConfigs = ['blankPage' => true]; + + return view('/content/miscellaneous/page-maintenance', [ + 'pageConfigs' => $pageConfigs + ]); + } +} diff --git a/app/Http/Controllers/PageLayoutController.php b/app/Http/Controllers/PageLayoutController.php new file mode 100644 index 0000000..3a18256 --- /dev/null +++ b/app/Http/Controllers/PageLayoutController.php @@ -0,0 +1,45 @@ + true]; + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Layouts"], ['name' => "Collapsed menu"]]; + return view('/content/page-layouts/layout-collapsed-menu', ['pageConfigs' => $pageConfigs, 'breadcrumbs' => $breadcrumbs]); + } + + // Boxed Layout + public function layout_boxed() + { + $pageConfigs = ['layoutWidth' => 'boxed']; + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Layouts"], ['name' => "Layout Boxed"]]; + return view('/content/page-layouts/layout-boxed', ['pageConfigs' => $pageConfigs, 'breadcrumbs' => $breadcrumbs]); + } + // Layout Without Menu + public function layout_without_menu() + { + $pageConfigs = ['showMenu' => false]; + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Layouts"], ['name' => "Layout without menu"]]; + return view('/content/page-layouts/layout-without-menu', ['pageConfigs' => $pageConfigs, 'breadcrumbs' => $breadcrumbs]); + } + // Empty Layout + public function layout_empty() + { + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Layouts"], ['name' => "Layout Empty"]]; + return view('/content/page-layouts/layout-empty', ['breadcrumbs' => $breadcrumbs]); + } + // Blank Layout + public function layout_blank() + { + $pageConfigs = ['blankPage' => true]; + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Layouts"], ['name' => "Layout Blank"]]; + return view('/content/page-layouts/layout-blank', ['pageConfigs' => $pageConfigs, 'breadcrumbs' => $breadcrumbs]); + } +} diff --git a/app/Http/Controllers/PagesController.php b/app/Http/Controllers/PagesController.php new file mode 100644 index 0000000..3fb0948 --- /dev/null +++ b/app/Http/Controllers/PagesController.php @@ -0,0 +1,88 @@ + "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Pages"], ['name' => "Account Settings"]]; + return view('/content/pages/page-account-settings', ['breadcrumbs' => $breadcrumbs]); + } + + // Profile + public function profile() + { + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Pages"], ['name' => "Profile"]]; + + return view('/content/pages/page-profile', ['breadcrumbs' => $breadcrumbs]); + } + + // FAQ + public function faq() + { + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Pages"], ['name' => "FAQ"]]; + return view('/content/pages/page-faq', ['breadcrumbs' => $breadcrumbs]); + } + + // Knowledge Base + public function knowledge_base() + { + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Pages"], ['name' => "Knowledge Base"]]; + return view('/content/pages/page-knowledge-base', ['breadcrumbs' => $breadcrumbs]); + } + + // Knowledge Base Category + public function kb_category() + { + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Pages"], ['link' => "/page/knowledge-base", 'name' => "Knowledge Base"], ['name' => "Category"]]; + return view('/content/pages/page-kb-category', ['breadcrumbs' => $breadcrumbs]); + } + + // Knowledge Base Question + public function kb_question() + { + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Pages"], ['link' => "/page/knowledge-base", 'name' => "Knowledge Base"], ['link' => "/page/kb-category", 'name' => "Category"], ['name' => "Question"]]; + return view('/content/pages/page-kb-question', ['breadcrumbs' => $breadcrumbs]); + } + + // pricing + public function pricing() + { + $pageConfigs = ['pageHeader' => false]; + return view('/content/pages/page-pricing', ['pageConfigs' => $pageConfigs]); + } + + // blog list + public function blog_list() + { + $pageConfigs = ['contentLayout' => 'content-detached-right-sidebar', 'bodyClass' => 'content-detached-right-sidebar']; + + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Pages"], ['link' => "javascript:void(0)", 'name' => "Blog"], ['name' => "List"]]; + + return view('/content/pages/page-blog-list', ['breadcrumbs' => $breadcrumbs, 'pageConfigs' => $pageConfigs]); + } + + // blog detail + public function blog_detail() + { + $pageConfigs = ['contentLayout' => 'content-detached-right-sidebar', 'bodyClass' => 'content-detached-right-sidebar']; + + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Pages"], ['link' => "javascript:void(0)", 'name' => "Blog"], ['name' => "Detail"]]; + + return view('/content/pages/page-blog-detail', ['breadcrumbs' => $breadcrumbs, 'pageConfigs' => $pageConfigs]); + } + + // blog edit + public function blog_edit() + { + + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Pages"], ['link' => "javascript:void(0)", 'name' => "Blog"], ['name' => "Edit"]]; + + return view('/content/pages/page-blog-edit', ['breadcrumbs' => $breadcrumbs]); + } +} diff --git a/app/Http/Controllers/PaymentController.php b/app/Http/Controllers/PaymentController.php index 9f089c5..fe3465a 100644 --- a/app/Http/Controllers/PaymentController.php +++ b/app/Http/Controllers/PaymentController.php @@ -5,33 +5,120 @@ use Illuminate\Http\Request; use App\Models\House; use App\Models\PaymentMode; +use App\Models\Activitylog; use App\Models\Payment; use App\Models\Resident; use App\Models\User; use Illuminate\Support\Facades\DB; +use Illuminate\Support\Facades\Auth; use Carbon\Carbon; class PaymentController extends Controller { public $initialpayment = 2100; public $monthlypayment = 700; - public function index() + // public function index($id=0) + // { + + // $months = config('global.months'); + + // if(isset($_GET['month'])) + // { + + // if (array_key_exists($_GET['month'], config('global.months'))) { + + // $payments = Payment::Monthlyfilter($_GET['month'])->pluck('id')->toarray(); + // $payments = Payment::sortedData($payments)->get(); + // $count = $payments->count(); + // $sum = $payments->sum('amount'); + // } + // else { + // return redirect()->route('payments.index')->with('error','Invalid Request'); + // } + // } + // elseif(isset($_GET['start_date']) && isset($_GET['end_date'])) + // { + // $startdate = strtotime($_GET['start_date']); + // $enddate = strtotime($_GET['end_date']); + + // if ( $startdate == true && $enddate == true) { + // $payments = Payment::Datebetween($_GET['start_date'], $_GET['end_date'])->pluck('id')->toarray(); + // $payments = Payment::sortedData($payments)->get(); + // $count = $payments->count(); + // $sum = $payments->sum('amount'); + // } else { + // return redirect()->route('payments.index')->with('error','Invalid Request'); + // } + // } + // elseif(isset($_GET['sort'])) + // { + // $payments= Payment::sort($_GET['sort']); + + // $count = $payments->count(); + // $sum = $payments->sum('amount'); + + // } + // elseif(isset($_GET['unpaid'])) + // { + // $month = $_GET['unpaid']; + + // $payments = DB::table('houses') + // ->selectRaw('houses.full_address') + // ->where('houses.house_type', 'house') + // ->whereNotIn('houses.id', function ($query) use ($month) { + // $query->select('house_id') + // ->from('payments') + // ->distinct() + // ->where('billingmonth', $month); + // })->get(); + + // $count = $payments->count(); + // foreach ($payments as $payment) { + // $array[] = House::where('full_address',$payment->full_address)->first(); + // } + + // $sum=0; + // $payments= collect($array); + // } + // else + // { + // $payments = Payment::Monthlyfilter(Carbon::now()->startOfMonth()->format('d-m-Y'))->pluck('id')->toarray(); + // $payments = Payment::sortedData($payments)->get(); + // $count = $payments->count(); + // $sum = $payments->sum('amount'); + // } + + // return view('payments.index', compact('payments', 'months', 'count', 'sum', 'id')); + // } + public function index($id=0) { $months = config('global.months'); - if(isset($_GET['month'])) + if(isset($_GET['sort'])) { + $payments= Payment::sort($_GET['sort'], $_GET['month'], $_GET['start_date'], $_GET['end_date']); - if (array_key_exists($_GET['month'], config('global.months'))) { + $count = $payments->count(); + $sum = $payments->sum('amount'); - $payments = Payment::Monthlyfilter($_GET['month'])->pluck('id')->toarray(); + } + elseif(isset($_GET['month'])) + { + + if($_GET['month']=='All') + { + $payments = Payment::get()->pluck('id')->toarray(); $payments = Payment::sortedData($payments)->get(); $count = $payments->count(); $sum = $payments->sum('amount'); } - else { - return redirect()->route('payments.index')->with('error','Invalid Request'); + else + { + $payments = Payment::Monthlyfilter($_GET['month'])->pluck('id')->toarray(); + $payments = Payment::sortedData($payments)->get(); + $count = $payments->count(); + $sum = $payments->sum('amount'); } } elseif(isset($_GET['start_date']) && isset($_GET['end_date'])) @@ -40,7 +127,9 @@ public function index() $enddate = strtotime($_GET['end_date']); if ( $startdate == true && $enddate == true) { - $payments = Payment::Datebetween($_GET['start_date'], $_GET['end_date'])->pluck('id')->toarray();; + $payments = Payment::Datebetween($_GET['start_date'], $_GET['end_date'])->pluck('id')->toarray(); + // $data= Payment::whereNotIn('id', $payments)->get(); + $payments = Payment::sortedData($payments)->get(); $count = $payments->count(); $sum = $payments->sum('amount'); @@ -48,43 +137,54 @@ public function index() return redirect()->route('payments.index')->with('error','Invalid Request'); } } - elseif(isset($_GET['search'])) - { - $house=$_GET['search']; - $payments = Payment::whereHas('houses', function ($query) use ($house) { - $query->where('full_address', 'Like', '%'.$house.'%'); - })->get()->pluck('id')->toarray(); - $payments = Payment::sortedData($payments)->get(); - $count = $payments->count(); - $sum = $payments->sum('amount'); - } elseif(isset($_GET['unpaid'])) { $month = $_GET['unpaid']; - $payments = DB::table('houses') - ->selectRaw('houses.full_address') - ->where('houses.house_type', 'house') - ->whereNotIn('houses.id', function ($query) use ($month) { - $query->select('house_id') - ->from('payments') - ->distinct() - ->where('billingmonth', $month); - })->get(); + if($month == 'All') { + $payments = House::whereNotIn('id', function ($query) { + $query->select('house_id') + ->from('payments'); + }) + ->get(); + + $count = count($payments); + $sum=0; + + } + else { + + $payments = DB::table('houses') + ->selectRaw('houses.full_address') + ->where('houses.house_type', 'house') + ->whereNotIn('houses.id', function ($query) use ($month) { + $query->select('house_id') + ->from('payments') + ->distinct() + ->where('billingmonth', $month); + })->get(); + + + $count = $payments->count(); + foreach ($payments as $payment) { + $array[] = House::where('full_address',$payment->full_address)->first(); + } + + $sum=0; + $payments= collect($array); + } - $count = $payments->count(); - $sum = 0 ; } else { - $payments = Payment::get()->pluck('id')->toarray(); + $payments = Payment::Monthlyfilter(Carbon::now()->startOfMonth()->format('d-m-Y'))->pluck('id')->toarray(); $payments = Payment::sortedData($payments)->get(); $count = $payments->count(); $sum = $payments->sum('amount'); } - return view('payments.index', compact('payments', 'months', 'count', 'sum')); + return view('payments.index', compact('payments', 'months', 'count', 'sum', 'id')); } @@ -117,7 +217,7 @@ public function store(Request $req, Payment $payment) if($initialpayment == null) { - Payment::create([ + $payment=Payment::create([ 'house_id' => $req['house_id'], 'billingmonth' => $req['billingmonth'][0], @@ -133,7 +233,7 @@ public function store(Request $req, Payment $payment) { if(Payment::where('house_id', $req->house_id)->where('billingmonth',$month)->first() == null) { - Payment::create([ + $payment=Payment::create([ 'house_id' => $req['house_id'], 'billingmonth' => $month, @@ -154,7 +254,7 @@ public function store(Request $req, Payment $payment) { if(Payment::where('house_id', $req->house_id)->where('billingmonth',$month)->first() == null) { - Payment::create([ + $payment=Payment::create([ 'house_id' => $req['house_id'], 'billingmonth' => $month, 'amount' => $this->monthlypayment, @@ -162,7 +262,6 @@ public function store(Request $req, Payment $payment) 'dateofdeposit' => Carbon::parse($req->dateofdeposit)->format('d-m-Y'), 'comments' => $req['comments'] ]); - } } return back()->with('success', 'Payment Added Successfully'); @@ -190,6 +289,7 @@ public function edit(Payment $payment) public function update(Request $req, Payment $payment) { + $attributes= $req->validate([ 'house_id' =>'required', 'billingmonth' => 'required', @@ -202,10 +302,22 @@ public function update(Request $req, Payment $payment) if($exists) { - return back()->with('error', 'Payment Already Exists'); + $payment->update([ + 'payment_modes_id' => $req['payment_modes_id'], + 'dateofdeposit' => Carbon::parse($req->dateofdeposit)->format('d-m-Y'), + 'comments' => $req['comments'] + ]); + + return redirect()->route('payments.index')->with('success', 'Payment Edited Succesfully'); } - $payment->update($attributes); + $payment->update([ + 'house_id' => $req['house_id'], + 'billingmonth' => $req['billingmonth'], + 'payment_modes_id' => $req->payment_modes_id, + 'dateofdeposit' => Carbon::parse($req->dateofdeposit)->format('d-m-Y'), + 'comments' => $req['comments'] + ]); return redirect()->route('payments.index')->with('success', 'Payment Edited Succesfully'); } @@ -214,19 +326,30 @@ public function destroy(Payment $payment) { abort_if(auth()->user()->usertype_id != User::ADMIN, 403, 'Access Deined'); - $payment->delete()->with('success','payment deleted successfully'); - return redirect()->back(); + $payment->delete(); + + return back()->with('success','payment deleted successfully'); } public function ajax(Request $request) { $houseId = $request->input('house_id'); - $payments = Payment::where('house_id',$houseId)->get(); - $billingmonths = $payments->pluck('billingmonth'); + + $payments = Payment::where('house_id', $houseId) + ->with('paymentmode') + ->get() + ->map(function ($payment) { + return [ + 'name' => $payment->paymentmode->name, + 'billingmonth' => $payment->billingmonth, + 'dateofdeposit' => $payment->dateofdeposit + ]; + }); + + $payments = collect($payments)->toArray(); return response()->json([ - 'status' => 'success', - 'billingmonths' => $billingmonths, + 'payments' => isset($payments[0]) ? $payments : null ]); } } diff --git a/app/Http/Controllers/PlaylistController.php b/app/Http/Controllers/PlaylistController.php new file mode 100644 index 0000000..09dc8f9 --- /dev/null +++ b/app/Http/Controllers/PlaylistController.php @@ -0,0 +1,160 @@ +validate([ + 'model_type' => "bail|required|in:event,video", + 'model_id' => "bail|required|numeric|exists:{$request->model_type}s,id", + 'type' => "bail|required|in:reminder" + ]); + + + $playlist = Playlist::where([ + 'model_type' => $request->model_type, + 'model_id' => $request->model_id, + 'user_id' => auth()->user()->id, + 'playlist_type' => $request->type + ])->first(); + + if($playlist) { + $playlist->delete(); + + if($request->model_type == 'event') { + $event = Event::find($request->model_id); + $record = ScheduledNotification::where( + 'notification', + Serializer::create()->serializeNotifiable(new EventReminder($event)) + )->where([ + 'target_id' => auth()->user()->id, + 'target_type' => 'App\User' + ])->first(); + + if($record) { + $record->delete(); + } + } + + return response()->json([ + 'success' => true, + 'newtext' => 'Request Reminder', + 'code' => 'success', + 'title' => 'Success!', + 'message' => 'Reminder Cancelled.' + ]); + } else { + Playlist::create([ + 'model_type' => $request->model_type, + 'model_id' => $request->model_id, + 'playlist_type' => $request->type, + 'user_id' => auth()->user()->id, + ]); + + // Schedule Reminder + try { + if($request->model_type == 'event') { + $event = Event::find($request->model_id); + auth()->user()->notifyAt( + new EventReminder($event), + Carbon::parse(Timezone::convertToLocal($event->start_date_time)) + ); + } + } catch(\Exception $e) { + logger("Runtime Error:" . $e->getMessage()); + } + + return response()->json([ + 'success' => true, + 'newtext' => 'Cancel Reminder', + 'code' => 'success', + 'title' => 'Success!', + 'message' => 'Reminder Requested.', + ]); + } + } + + /** + * 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) + { + // + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param int $id + * @return \Illuminate\Http\Response + */ + public function update(Request $request, $id) + { + // + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function destroy($id) + { + // + } +} diff --git a/app/Http/Controllers/Presenter/EventController.php b/app/Http/Controllers/Presenter/EventController.php new file mode 100644 index 0000000..6e8bbf4 --- /dev/null +++ b/app/Http/Controllers/Presenter/EventController.php @@ -0,0 +1,96 @@ + false, + 'pageHeader' => true, + 'mainLayoutType' => 'subscriber' + ]); + } + /** + * Display a listing of the resource. + * + * @return \Illuminate\Http\Response + */ + public function index() + { + + if(request()->ajax()) { + + $events = Event::join('users', 'users.id', '=', 'events.user_id') + ->join('event_user', 'event_user.event_id', '=', 'events.id') + ->where('event_user.user_id', auth()->user()->id) + ->where('events.status', 'publish'); + + if(request()->get('view') == 'calendar') { + $events->select('events.*', 'start_date_time as start'); + return $events->get()->toJson(); + } + + $events->select('events.*', 'users.name as user_name', 'users.last_name as user_last_name', 'users.email as user_email'); + + return datatables()->of($events) + ->editColumn('title', function($event) { + return Helper::tooltip($event->title, 25); + }) + ->editColumn('created_at', function($event) { + return Timezone::convertToLocal($event->created_at, 'd M Y'); + }) + ->editColumn('status', function($event) { + return $event->statusHtml(); + }) + ->editColumn('start_date_time', function($event) { + return Timezone::convertToLocal($event->start_date_time, 'd M Y h:i A'); + }) + ->addColumn('user_name', function($event) { + $user = $event->user_name . $event->user_last_name ?? ""; + return $user . "
" . "{$event->user_email}"; + }) + ->addColumn('action', function($event) { + $eventInfoUrl = route('presenter.events.show', $event->id); + $liveUrl = route('live.event.index', $event->id); + return " + + Enter Live + "; + + }) + ->rawColumns(['action', 'is_active', 'users', 'status', 'title', 'user_name']) + ->make(true); + } else { + + $breadcrumbs = [ + ['link' => "/", 'name' => "Dashboard"], + ['name' => "Events"] + ]; + return view('/content/events/presenter/index', compact('breadcrumbs')); + } + + } + + public function show($id) + { + $record = Event::findOrFail($id); + $record->start_date_time = Timezone::convertToLocal($record->start_date_time, 'd M Y h:i A'); + return view('/content/events/manage/show', compact('record')); + } +} diff --git a/app/Http/Controllers/PresenterController.php b/app/Http/Controllers/PresenterController.php new file mode 100644 index 0000000..b07eb41 --- /dev/null +++ b/app/Http/Controllers/PresenterController.php @@ -0,0 +1,270 @@ +ajax()) { + switch(request()->get('view')) { + case 'all': + $users = User::role('presenter')->where('id', '<>', auth()->user()->id); + break; + case 'trash': + $users = User::role('presenter')->onlyTrashed()->where('id', '<>', auth()->user()->id); + break; + } + + return datatables()->of($users) + ->editColumn('created_at', function($user) { + return Timezone::convertToLocal($user->created_at, 'd M Y'); + }) + ->editColumn('is_active', function($user) { + if($user->approved()) { + return $user->statusHtml(); + } else if($user->profile_status == 'decline') { + return 'Declined'; + } else { + return 'Not Approved'; + } + }) + ->addColumn('action', function($user) { + $deleteUrl = route('presenters.destroy', $user->id); + + if($user->trashed()) { + $url = route('presenters.restore', $user->id); + + return " + + + + "; + } else { + $url = route('presenters.edit', $user->id); + + return " + + + + "; + + } + }) + ->rawColumns(['action', 'is_active']) + ->make(true); + } else { + $pageConfigs = ['pageHeader' => true]; + $breadcrumbs = [ + ['link' => "/", 'name' => "Dashboard"], + ['name' => "Presenters"] + ]; + return view('/content/presenters/index', compact('breadcrumbs')); + } + + } + + /** + * Show the form for creating a new resource. + * + * @return \Illuminate\Http\Response + */ + public function create() + { + return view('/content/presenters/create'); + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function store(Request $request) + { + $request->validate($this->validationRules()); + + $user = new User(); + $user->name = $request->name; + $user->email = $request->email; + $user->password = Hash::make($request->password); + $user->is_active = true; + $user->save(); + + $user->syncRoles(['presenter']); + + if($request->has('notify')) { + // Todo - Send Credentias on email. + $user->sendCredentials($request->password); + } + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Presenter created successfully.' + ]); + } + + /** + * 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) + { + $user = User::withTrashed()->findOrFail($id); + $userMeta = []; + $userMetaRecords = UserMeta::where('user_id', $user->id)->get(); + foreach ($userMetaRecords as $meta) { + $userMeta[$meta->meta_key] = $meta->meta_value; + } + $userAddress = $user->address('institution_address'); + return view('/content/presenters/edit', compact('user', 'userAddress', 'userMeta')); + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param int $id + * @return \Illuminate\Http\Response + */ + public function update(Request $request, $id) + { + $user = User::findOrFail($id); + // $passwordValidation = !empty($request->password) ? 'required|min:6' : ''; + // $request->validate($this->validationRules([ + // 'email' => 'required|email|unique:users,email,' . $id, + // 'password' => $passwordValidation + // ])); + + // $user->name = $request->name; + // $user->email = $request->email; + // if(!empty($request->password)) { + // $user->password = Hash::make($request->password); + // } + if($request->has('profile_status') && in_array($request->profile_status, array_keys(config('setting.profile_status')))) { + $user->profile_status = $request->profile_status; + $user->notify(new AccountApproved); + } + + if($request->has('is_active')) { + $user->is_active = $request->is_active == 1 ? true : false; + } + $user->save(); + + + if(!empty($request->password) && $request->has('notify')) { + // Todo - Send Credentias on email. + $user->sendCredentials($request->password); + } + // Todo - Send Credentias on email. + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Presenter updated successfully.' + ]); + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function destroy($id) + { + $user = User::withTrashed()->findOrFail($id); + if ($user->trashed()) { + $user->forceDelete(); + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Presenter permanently deleted successfully.' + ]); + } else { + $user->delete(); + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Presenter moved to trash successfully.' + ]); + } + } + + public function restore($id) + { + $user = User::withTrashed()->findOrFail($id); + if($user->trashed()) { + $user->restore(); + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Presenter user restored successfully.' + ]); + } else { + return response()->json([ + 'message' => 'Not found' + ], 404); + } + } + + public function validationRules($overrideRule = []) + { + $rules = [ + 'name' => 'required|max:255', + 'email' => 'required|email|max:255|unique:users', + 'password' => 'required|min:6|max:255' + ]; + return array_merge($rules, $overrideRule); + } + +} diff --git a/app/Http/Controllers/ResidentController.php b/app/Http/Controllers/ResidentController.php index 6fcfde0..8295d7a 100644 --- a/app/Http/Controllers/ResidentController.php +++ b/app/Http/Controllers/ResidentController.php @@ -6,6 +6,7 @@ use App\Models\Resident; use App\Models\User; use App\Models\House; +use Illuminate\Support\Facades\DB; use Illuminate\Database\QueryException; use Carbon\Carbon; @@ -14,7 +15,18 @@ class ResidentController extends Controller public function index() { - $residents=Resident::orderBy('house_id')->get(); + if(isset($_GET['search'])) { + $search=$_GET['search']; + $residents = Resident::join('users', 'users.id', '=', 'residents.user_id') + ->select('residents.*') + ->where('users.name', 'Like',$search.'%') + ->get(); + + } + else { + + $residents=Resident::orderBy('house_id')->get(); + } return view('residents.index', compact('residents')); } diff --git a/app/Http/Controllers/SocietyController.php b/app/Http/Controllers/SocietyController.php new file mode 100644 index 0000000..c213a75 --- /dev/null +++ b/app/Http/Controllers/SocietyController.php @@ -0,0 +1,88 @@ +validate([ + + 'name' => 'required|max:255|min:3|unique:societies', + 'description' => 'required|min:3', + ]); + + if($req->file('image')) + { + + $path = $req->file('image')->store('public/files'); + + $attributes+=[ + + 'image' => $path, + ]; + } + + Society::create($attributes); + + return redirect()->route('society.index'); + } + + // public function edit(Society $society) + // { + + // return view('societies.edit', compact('society')); + // } + + public function update(Request $request, $id) + { + + $society = Society::findOrFail($id); + + $validator = Validator::make($request->all(), [ + + 'name' => 'required|max:255|min:3', + 'description' => 'required|min:3', + ]); + + if ($validator->fails()) { + return response()->json([ + 'error' => $validator->errors() + ]); + } + + $society->update([ + 'name' => $request->name, + 'description' => $request->description, + ]); + + return response()->json(['success'=>'society updated successfully']); + } + + public function delete(Society $society) + { + $society->delete(); + + + return redirect()->route('society.index'); + } +} diff --git a/app/Http/Controllers/Subscriber/EventController.php b/app/Http/Controllers/Subscriber/EventController.php new file mode 100644 index 0000000..ef491c5 --- /dev/null +++ b/app/Http/Controllers/Subscriber/EventController.php @@ -0,0 +1,74 @@ + false, + 'pageHeader' => false, + 'mainLayoutType' => 'subscriber' + ]); + } + + public function index() + { + if (request()->get('s')) { + $events = Event::where('status', Event::UPCOMING) + ->whereHas('keywords', function ($q) { + $q->where('keyword_name', 'like', "%" . request()->get('s') . "%"); + }); + } else { + $events = Event::where('status', Event::UPCOMING); + } + + $events->orderBy('start_date_time', 'asc'); + + $events = $events->paginate(9); + + return view('content/subscriber/events/index', compact('events')); + } + + public function show(Request $request, $id) + { + $pageConfigs = [ + 'pageHeader' => false, + 'showMenu' => false, + 'verticalMenuNavbarType' => 'hidden', + 'pageClass' => 'chat-application', + 'mainLayoutType' => 'subscriber' + ]; + + $event = Event::findOrFail($id); + + if( auth()->user()->hasRole('super_admin') || auth()->user()->id == $event->user_id ) {} else { + if($event->status != Event::UPCOMING) { + abort(403, "Access Denied"); + } + } + + $event->token = $event->generateToken(); + + $keywords = $event->keywords()->pluck('keyword_name')->toArray(); + $events = Event::where('status', Event::UPCOMING) + ->whereHas('keywords', function ($q) use ($keywords) { + foreach($keywords as $keyword) { + $q->orWhere('keyword_name', 'like', "%" . $keyword . "%"); + } + }) + ->where('id', '<>', $event->id) + ->orderBy('start_date_time', 'asc')->limit(3)->get(); + + return view('content/subscriber/events/show', compact('event', 'events', 'pageConfigs')); + } +} diff --git a/app/Http/Controllers/Subscriber/VideoController.php b/app/Http/Controllers/Subscriber/VideoController.php new file mode 100644 index 0000000..ae6ddc5 --- /dev/null +++ b/app/Http/Controllers/Subscriber/VideoController.php @@ -0,0 +1,67 @@ + false, + 'pageHeader' => false, + 'mainLayoutType' => 'subscriber' + ]); + } + + public function index() + { + if (request()->get('s')) { + $videos = Video::where('status', 'publish') + ->whereHas('keywords', function ($q) { + $q->where('keyword_name', 'like', "%" . request()->get('s') . "%"); + }); + } else { + $videos = Video::where('status', 'publish'); + } + + $videos = $videos->paginate(9); + + return view('content/subscriber/videos/index', compact('videos')); + } + + public function show(Request $request, $id) + { + $pageConfigs = [ + 'pageHeader' => false, + 'showMenu' => false, + 'verticalMenuNavbarType' => 'hidden', + 'pageClass' => 'chat-application', + 'mainLayoutType' => 'subscriber' + ]; + + $video = Video::findOrFail($id); + if( auth()->user()->hasRole('super_admin') || auth()->user()->id == $video->user_id ) {} else { + if($video->status != 'publish') { + abort(403, "Access Denied"); + } + } + $keywords = $video->keywords()->pluck('keyword_name')->toArray(); + + $videos = Video::where('status', 'publish') + ->whereHas('keywords', function ($q) use ($keywords) { + foreach($keywords as $keyword) { + $q->orWhere('keyword_name', 'like', "%" . $keyword . "%"); + } + })->limit(3)->get(); + + return view('content/subscriber/videos/show', compact('video', 'videos', 'pageConfigs')); + } +} diff --git a/app/Http/Controllers/SubscriberController.php b/app/Http/Controllers/SubscriberController.php new file mode 100644 index 0000000..0ad104b --- /dev/null +++ b/app/Http/Controllers/SubscriberController.php @@ -0,0 +1,259 @@ +ajax()) { + switch (request()->get('view')) { + case 'all': + $users = User::role('subscriber')->where('users.id', '<>', auth()->user()->id); + break; + case 'trash': + $users = User::role('subscriber')->leftJoin('subscriptions', 'subscriptions.user_id', '=', 'users.id') + ->onlyTrashed() + ->where('users.id', '<>', auth()->user()->id)->select('users.*', 'subscriptions.stripe_status as stripe_status'); + break; + } + $users->where('email_verified_at', '<>', NULL); + + if(request()->get('can_contact')) { + $users->where('can_contact', request()->get('can_contact')); + } + if(request()->get('subscription_status')) { + // $users->where('can_contact', request()->get('can_contact')); + } + + return datatables()->of($users) + ->editColumn('created_at', function ($user) { + return Timezone::convertToLocal($user->created_at, 'd M Y'); + }) + ->editColumn('email', function($user) { + return "{$user->email}"; + }) + ->editColumn('last_name', function($user) { + if(is_null($user->last_name) || $user->last_name == "") { + return "N/A"; + } + return $user->last_name; + }) + ->editColumn('is_active', function ($user) { + return $user->statusHtml(); + }) + ->editColumn('can_contact', function($user) { + return $user->can_contact ? "Yes" : "No"; + }) + ->addColumn('subscription_status', function($user) { + if ($user->subscribed('default')) { + return "Subscribed"; + } else { + return "Not Subscribed"; + } + }) + ->addColumn('action', function ($user) { + + $showUrl = route('users.show', $user->id); + $title = $user->fullName() . " - " . $user->email; + return " + + "; + + }) + ->rawColumns(['action', 'is_active', 'subscription_status', 'email']) + ->make(true); + } else { + $pageConfigs = ['pageHeader' => true]; + $breadcrumbs = [ + ['link' => "/", 'name' => "Dashboard"], + ['name' => "Subscribers"] + ]; + return view('/content/users/index', compact('breadcrumbs')); + } + } + + /** + * Show the form for creating a new resource. + * + * @return \Illuminate\Http\Response + */ + public function create() + { + return view('/content/users/create'); + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function store(Request $request) + { + $request->validate($this->validationRules()); + + $user = new User(); + $user->name = $request->name; + $user->email = $request->email; + $user->password = Hash::make($request->password); + $user->is_active = true; + $user->save(); + + $user->syncRoles(['user']); + + if ($request->has('notify')) { + // Todo - Send Credentias on email. + $user->sendCredentials($request->password); + } + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Subscriber created successfully.' + ]); + } + + /** + * Display the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function show($id) + { + $user = User::withTrashed()->findOrFail($id); + $userMeta = []; + $userMetaRecords = UserMeta::where('user_id', $user->id)->get(); + foreach ($userMetaRecords as $meta) { + $userMeta[$meta->meta_key] = $meta->meta_value; + } + $userAddress = $user->address('institution_address'); + return view('/content/users/show', compact('user', 'userAddress', 'userMeta')); + } + + /** + * Show the form for editing the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function edit($id) + { + $user = User::findOrFail($id); + return view('/content/users/edit', compact('user')); + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param int $id + * @return \Illuminate\Http\Response + */ + public function update(Request $request, $id) + { + $user = User::findOrFail($id); + $passwordValidation = !empty($request->password) ? 'required|min:6' : ''; + $request->validate($this->validationRules([ + 'email' => 'required|email|unique:users,email,' . $id, + 'password' => $passwordValidation + ])); + + $user->name = $request->name; + $user->email = $request->email; + if (!empty($request->password)) { + $user->password = Hash::make($request->password); + } + $user->is_active = $request->is_active == 1 ? true : false; + $user->save(); + + + if (!empty($request->password) && $request->has('notify')) { + // Todo - Send Credentias on email. + $user->sendCredentials($request->password); + } + // Todo - Send Credentias on email. + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Subscriber updated successfully.' + ]); + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function destroy($id) + { + $user = User::withTrashed()->findOrFail($id); + if ($user->trashed()) { + $user->forceDelete(); + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Subscriber permanently deleted successfully.' + ]); + } else { + $user->delete(); + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Subscriber moved to trash successfully.' + ]); + } + } + + public function restore($id) + { + $user = User::withTrashed()->findOrFail($id); + if ($user->trashed()) { + $user->restore(); + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Subscriber restored successfully.' + ]); + } else { + return response()->json([ + 'message' => 'Not found' + ], 404); + } + } + + public function validationRules($overrideRule = []) + { + $rules = [ + 'name' => 'required|max:255', + 'email' => 'required|email|max:255|unique:users', + 'password' => 'required|min:6|max:255' + ]; + return array_merge($rules, $overrideRule); + } +} diff --git a/app/Http/Controllers/Subscriptions/PaymentController.php b/app/Http/Controllers/Subscriptions/PaymentController.php new file mode 100644 index 0000000..8fc3a15 --- /dev/null +++ b/app/Http/Controllers/Subscriptions/PaymentController.php @@ -0,0 +1,28 @@ + auth()->user()->createSetupIntent() + ]; + + return view('subscriptions.payment')->with($data); + } + + public function store(Request $request) { + $this->validate($request, [ + 'token' => 'required' + ]); + + $request->user()->newSubscription('default', 'price_1IWmwFGJDz1oPimHukgcaXhe')->create($request->token); + + return back(); + } +} diff --git a/app/Http/Controllers/Subscriptions/SubscriptionController.php b/app/Http/Controllers/Subscriptions/SubscriptionController.php new file mode 100644 index 0000000..273daee --- /dev/null +++ b/app/Http/Controllers/Subscriptions/SubscriptionController.php @@ -0,0 +1,25 @@ +user()->newSubscription('default', 'price_1IWmwFGJDz1oPimHukgcaXhe') + ->trialDays(3) + ->allowPromotionCodes() + ->checkout(); + $checkouts['professor'] = auth()->user()->newSubscription('default', 'price_1IWmwFGJDz1oPimHukgcaXhe') + ->allowPromotionCodes() + ->checkout(); + $checkouts['student'] = auth()->user()->newSubscription('default', 'price_1IWmwFGJDz1oPimHukgcaXhe') + ->allowPromotionCodes() + ->checkout(); + $plans = config('plan'); + return view('subscriptions.plans', compact('plans', 'checkouts')); + } +} diff --git a/app/Http/Controllers/TableController.php b/app/Http/Controllers/TableController.php new file mode 100644 index 0000000..49a272c --- /dev/null +++ b/app/Http/Controllers/TableController.php @@ -0,0 +1,46 @@ + "/", 'name' => "Home"], ['name' => "Table Bootstrap"]]; + return view('/content/table/table-bootstrap/table-bootstrap', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Datatable Basic + public function datatable_basic() + { + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Datatable"], ['name' => "Basic"]]; + return view('/content/table/table-datatable/table-datatable-basic', ['breadcrumbs' => $breadcrumbs]); + } + + // Datatable Basic + public function datatable_advance() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Datatable"], ['name' => "Advanced"] + ]; + return view('/content/table/table-datatable/table-datatable-advance', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // ag-Grid Table + public function ag_grid() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['name' => "agGrid Table"] + ]; + return view('/content/table/table-ag-grid/table-ag-grid', [ + 'breadcrumbs' => $breadcrumbs + ]); + } +} diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index 0c8182d..ae53959 100644 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -5,6 +5,7 @@ use Illuminate\Http\Request; use App\Models\User; use App\Models\Society; +use App\Models\Payment; use App\Models\Usertype; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Validator; @@ -18,10 +19,17 @@ class UserController extends Controller public function index() { - $users = User::orderBy('usertype_id', 'asc') - ->orderBy('name', 'asc') - ->get(); + if(isset($_GET['search'])) + { + $users = User::search($_GET['search']); + } + else + { + $users = User::orderBy('usertype_id', 'asc') + ->orderBy('name', 'asc') + ->get(); + } return view('users.index', compact('users')); } @@ -99,11 +107,11 @@ public function update(Request $request, User $user) ]); $password = $request->validate([ - 'password' => 'nullable', + 'password' => 'nullable|min:8', 'confirmPassword' => 'same:password', ]); - if($password['password']) + if(!empty($password['password'])) { $user->update([ 'password' => Hash::make( $password['password']) @@ -139,8 +147,28 @@ public function destroy($id) } public function home() { + $house_ids = Auth::user()->houses()->get()->pluck('id'); + $paymentsByMonth = collect(); + + foreach ($house_ids as $house_id) { + $payments = Payment::where('house_id', $house_id) + ->get() + ->groupBy('billingmonth') + ->map(function ($group) { + return $group->sum('amount'); + }); + + $paymentsByMonth = $paymentsByMonth->mergeRecursive($payments); + } + + $paymentsByMonth = $paymentsByMonth->map(function ($values) { + return collect($values)->sum(); + }); + + $paymentsByMonth= $paymentsByMonth->toArray(); - return view('users.home'); + + return view('users.home',compact('paymentsByMonth')); } public function profileEdit() @@ -271,4 +299,41 @@ public function forgetstore(User $user, Request $req) return redirect("/")->with('success', 'Password Changed Successfully'); } + public function imagestore(Request $request) + { + $this->validate($request, [ + 'image' => 'required|image|mimes:jpg,png,jpeg,gif,svg', + ]); + + $image_path = $request->file('image')->storeAs('public/image', 'UserImage'.time().'.jpg'); + + Auth()->user()->update([ + + 'user_image' => str_replace('public/','',$image_path) + ]); + + return back()->with('success', 'Image Updated Successfully'); + } + + public function resetcreate(User $user) + { + + return view('reset',compact('user')); + } + + public function userresetcreate(User $user) + { + + return view('users.reset',compact('user')); + } + + public function imageDestroy(User $user) { + if($user->user_image){ + $user->update([ + 'user_image' => null + ]); + return back()->with('success','image removed successfully'); + } + return back(); + } } diff --git a/app/Http/Controllers/UserInterfaceController.php b/app/Http/Controllers/UserInterfaceController.php new file mode 100644 index 0000000..4229073 --- /dev/null +++ b/app/Http/Controllers/UserInterfaceController.php @@ -0,0 +1,41 @@ + "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "UI"], ['name' => "Typography"] + ]; + return view('/content/ui-pages/ui-typography', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // UI Elements - Colors + public function colors() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "UI"], ['name' => "Colors"] + ]; + return view('/content/ui-pages/ui-colors', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Icons Feather + public function icons_feather() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "UI"], ['name' => "Feather Icons"] + ]; + return view('/content/ui-pages/icons-feather', [ + 'breadcrumbs' => $breadcrumbs + ]); + } +} diff --git a/app/Http/Controllers/VideoController.php b/app/Http/Controllers/VideoController.php new file mode 100644 index 0000000..d773adf --- /dev/null +++ b/app/Http/Controllers/VideoController.php @@ -0,0 +1,339 @@ +ajax()) { + + if (auth()->user()->hasRole('super_admin')) { + $videos = Video::with('user')->where('videos.id', '<>', 0); + if (request()->get('view') == 'trash') { + $videos->onlyTrashed(); + } + } else { + + if (request()->get('view') == 'trash') { + + $videos = Video::onlyTrashed()->leftJoin('events', 'events.id', '=', 'videos.event_id') + ->leftJoin('event_user', 'event_user.event_id', '=', 'events.id') + ->where(function($query) { + $query->where('event_user.user_id', auth()->user()->id); + $query->orWhere('videos.user_id', auth()->user()->id); + }) + ->select('videos.*'); + } else { + $videos = Video::leftJoin('events', 'events.id', '=', 'videos.event_id') + ->leftJoin('event_user', 'event_user.event_id', '=', 'events.id') + ->where(function($query) { + $query->where('event_user.user_id', auth()->user()->id); + $query->orWhere('videos.user_id', auth()->user()->id); + }) + ->select('videos.*'); + } + } + + + if (request()->get('video_status') != "") { + $videos->where('videos.status', request()->get('video_status')); + } + + return datatables()->of($videos) + ->editColumn('title', function ($video) { + $title = Helper::tooltip($video->title, 50); + $videoLink = route('subscriber.videos.show', $video->id); + return "$title "; + }) + ->editColumn('path', function($video) { + $video->path = config('setting.s3_url') . $video->path; + return "View"; + }) + ->editColumn('created_at', function ($video) { + return Timezone::convertToLocal($video->created_at, 'd M Y'); + }) + ->editColumn('status', function ($video) { + return $video->statusHtml(); + }) + ->editColumn('start_date_time', function ($video) { + return Timezone::convertToLocal($video->start_date_time, 'd M Y h:i A'); + }) + ->addColumn('users', function ($video) { + if (isset($video->user->id)) { + if (auth()->user()->id == $video->user->id) { + return "Me"; + } else { + $user = $video->user; + return $video->user->fullName() . "
" . "{$user->email}"; + } + } else { + return "N/A"; + } + }) + ->addColumn('last_name', function($video) { + if(!isset($video->user->id)) { return "N/A"; } + return $video->user->last_name; + }) + ->addColumn('email', function($video) { + if(!isset($video->user->id)) { return "N/A"; } + return $video->user->email; + }) + ->addColumn('action', function ($video) { + + $deleteUrl = route('videos.destroy', $video->id); + + if ($video->trashed()) { + $url = route('videos.restore', $video->id); + + return " + + + + "; + } else { + $url = route('videos.edit', $video->id); + + return " + + + + + "; + } + }) + ->rawColumns(['action', 'path', 'is_active', 'users', 'status', 'title']) + ->make(true); + } else { + + $pageConfigs = ['pageHeader' => true]; + $breadcrumbs = [ + ['link' => "/", 'name' => "Dashboard"], + ['name' => "Videos"] + ]; + return view('/content/videos/manage/index', compact('breadcrumbs')); + } + } + + /** + * Show the form for creating a new resource. + * + * @return \Illuminate\Http\Response + */ + public function create() + { + return view('/content/videos/manage/create'); + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function store(Request $request) + { + $request->validate([ + 'title' => 'required|max:255', + 'video' => 'mimes:mp4,jpg,jpeg|nullable', + 'status' => 'required|in:publish,pending' + ]); + + $path = Storage::disk('s3')->put('videos', $request->video); + + $video = Video::create([ + 'title' => $request->title, + 'status' => $request->status, + 'user_id' => auth()->user()->id, + 'path' => $path + ]); + + foreach($request->keywords as $keywordId) { + if(!is_numeric($keywordId)) { + $keyword = Keyword::create([ + 'keyword_name' => $keywordId, + ]); + $keywordId = $keyword->id; + } + + $keywordIds[] = $keywordId; + } + + $video->keywords()->sync($keywordIds ?? []); + + if ($request->hasFile('logo')) { + $video->addOrUpdateLogo($request->file('logo')); + } + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'message' => 'File uploaded successfully.', + 'title' => 'Congratulations', + 'path' => $path + ]); + } + + /** + * Display the specified resource. + * + * @param \App\Video $video + * @return \Illuminate\Http\Response + */ + public function show(Video $video) + { + // + } + + /** + * Show the form for editing the specified resource. + * + * @param \App\Video $video + * @return \Illuminate\Http\Response + */ + public function edit(Video $video) + { + return view('/content/videos/manage/edit', compact('video')); + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param \App\Video $video + * @return \Illuminate\Http\Response + */ + public function update(Request $request, Video $video) + { + $request->validate([ + 'title' => 'required|max:255', + 'status' => 'required|in:publish,pending' + ]); + + $video->title = $request->title; + $video->status = $request->status; + $video->save(); + + $keywordIds = []; + + foreach($request->keywords as $keywordId) { + if(!is_numeric($keywordId)) { + $keyword = Keyword::create([ + 'keyword_name' => $keywordId, + ]); + $keywordId = $keyword->id; + } + + $keywordIds[] = $keywordId; + } + + $video->keywords()->sync($keywordIds ?? []); + + if ($request->hasFile('logo')) { + $video->addOrUpdateLogo($request->file('logo')); + } + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations!', + 'message' => 'Video information updated successfully.' + ]); + } + + /** + * Remove the specified resource from storage. + * + * @param \App\Video $video + * @return \Illuminate\Http\Response + */ + public function destroy(Video $video) + { + // $record = Event::withTrashed()->findOrFail($id); + $record = $video; + if ($record->trashed()) { + if ($record->path) { + $pathLocation = $record->path; + } else { + $pathLocation = ""; + } + + $record->forceDelete(); + + if (!empty($pathLocation)) { + // Storage::disk('s3')->delete($pathLocation); + } + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Video permanently deleted successfully.' + ]); + } else { + $record->delete(); + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Video moved to trash successfully.' + ]); + } + } + + public function restore($id) + { + $record = Video::withTrashed()->findOrFail($id); + if ($record->trashed()) { + $record->restore(); + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Video restored successfully.' + ]); + } else { + return response()->json([ + 'message' => 'Not found' + ], 404); + } + } +} diff --git a/app/Http/Controllers@20230623/AdminController.php b/app/Http/Controllers@20230623/AdminController.php new file mode 100644 index 0000000..44b35e9 --- /dev/null +++ b/app/Http/Controllers@20230623/AdminController.php @@ -0,0 +1,256 @@ +count(); + $sum = $expenses->sum('amount'); + } + elseif(isset($_GET['search'])) + { + $expenses= Expense::search($_GET['search']); + $count = $expenses->count(); + $sum = $expenses->sum('amount'); + } + elseif(isset($_GET['start_date']) && isset($_GET['end_date'])) + { + $startdate = strtotime($_GET['start_date']); + $enddate = strtotime($_GET['end_date']); + + if ( $startdate == true && $enddate == true) { + $expenses = Expense::Datebetween($_GET['start_date'], $_GET['end_date']); + $count = $expenses->count(); + $sum = $expenses->sum('amount'); + } else { + return redirect()->route('payments.index')->with('error','Invalid Request'); + } + } + else + { + $expenses= Expense::Datebetween(Carbon::now()->startOfMonth(), Carbon::now()->endOfMonth()); + $count = $expenses->count(); + $sum = $expenses->sum('amount'); + } + + return view('admins.index', compact('expenses','sum', 'count','id')); + } + + public function create() + { + $PaymentModes = PaymentMode::get(); + + return view('admins.expense', compact('PaymentModes')); + } + + public function store(Request $req) + { + $messages = [ + 'payee.required' => 'The name field is required.', + 'payee.min' => 'The name field must be at least 3 characters.', + 'payee.max' => 'The name may not be greater than 255 characters.', + 'amount.required' => 'The amount field is required.', + 'amount.gt' => 'The amount field must be a number greater than zero .', + 'payment_modes_id.required' => 'The payment mode field is required.', + ]; + $attributes= $req->validate([ + 'payee' =>'required|min:3|max:255', + 'amount' => 'required|gt:0', + 'comments' => 'nullable', + 'payment_modes_id' =>'required', + 'dateofpayment' => 'required|date', + ], $messages); + + $expense=Expense::create([ + 'payee' => $attributes['payee'], + 'amount' => $attributes['amount'], + 'comments' => $attributes['comments'], + 'payment_modes_id' =>$attributes['payment_modes_id'], + 'dateofpayment' => Carbon::parse($attributes['dateofpayment'])->format('d-m-Y'), + ]); + + // Activitylog::create([ + // 'user_id' => Auth::user()->id, + // 'action' => 'Created', + // 'module_id' => 2, + // 'module_item_id' => $expense->id + // ]); + + return back()->with('success', 'Expenses Added Successfully'); + } + + + public function report(Request $request) + { + $month = $request->input('month'); + + $houses = House::whereHas('payments', function($query) use ($month) { + $query->where('billingmonth', $month); + })->get()->toArray(); + + return ['houses' => $houses]; + } + + + public function show(string $id) + { + // + } + + + public function edit(Expense $expense) + { + $PaymentModes = PaymentMode::get(); + + return view('admins.edit', compact('expense', 'PaymentModes')); + } + + public function update(Request $request, Expense $expense) + { + $messages = [ + 'payee.required' => 'The name field is required.', + 'payee.min' => 'The name field must be at least 3 characters.', + 'payee.max' => 'The name may not be greater than 255 characters.', + 'amount.required' => 'The amount field is required.', + 'amount.gt' => 'The amount field must be a number greater than zero .', + 'payment_modes_id.required' => 'The payment mode field is required.', + ]; + $attributes= $request->validate([ + 'payee' =>'required|min:3|max:255', + 'amount' => 'required|gt:0', + 'comments' => 'nullable', + 'payment_modes_id' =>'required', + 'dateofpayment' => 'required|date', + ],$messages); + + $expense->update([ + 'payee' => $attributes['payee'], + 'amount' => $attributes['amount'], + 'comments' => $attributes['comments'], + 'payment_modes_id' =>$attributes['payment_modes_id'], + 'dateofpayment' => Carbon::parse($attributes['dateofpayment'])->format('d-m-Y'), + ]); + + // Activitylog::create([ + // 'user_id' => Auth::user()->id, + // 'action' => 'Updated', + // 'module_id' => 2, + // 'module_item_id' => $expense->id + // ]); + + return redirect()->route('expenses.index')->with('success', 'Expenses Updated Successfully'); + } + + + public function destroy(Expense $expense) + { + abort_if(auth()->user()->usertype_id != User::ADMIN, 403, 'Access Deined'); + + // Activitylog::create([ + // 'user_id' => Auth::user()->id, + // 'action' => 'Deleted', + // 'module_id' => 2, + // 'module_item_id' => $expense->id + // ]); + + $expense->delete(); + + return back()->with('success','expense deleted successfully'); + } + + public function loginsertion() + { + // for payment done by mishra + $logs = DB::table('activity_logs')->where('module_id', 1)->where('user_id',198)->get(); + + foreach($logs as $log) + { + $data = [ + 'attributes' => Payment::where('id',$log->module_item_id)->first()->toarray() + ]; + + DB::table('activity_log')->insert([ + 'log_name' => 'default', + 'description' => 'created', + 'subject_type' => 'App\Models\Payment', + 'event' => 'created', + 'subject_id' => $log->module_item_id, + 'causer_type' => 'App\Models\User', + 'causer_id' => 198, + 'properties' => json_encode($data), + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + ]); + + } + + //for payment done by amod sir + $logs = DB::table('activity_logs')->where('module_id', 1)->where('user_id',175)->get(); + + foreach($logs as $log) + { + $data = [ + 'attributes' => Payment::where('id',$log->module_item_id)->first()->toarray() + ]; + + DB::table('activity_log')->insert([ + 'log_name' => 'default', + 'description' => 'created', + 'subject_type' => 'App\Models\Payment', + 'event' => 'created', + 'subject_id' => $log->module_item_id, + 'causer_type' => 'App\Models\User', + 'causer_id' => 175, + 'properties' => json_encode($data), + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + ]); + + } + + //foreaxpense + $logs = DB::table('activity_logs')->where('module_id', 2)->get(); + + foreach($logs as $log) + { + $data = [ + 'attributes' => Expense::where('id',$log->module_item_id)->first()->toarray() + ]; + + DB::table('activity_log')->insert([ + 'log_name' => 'default', + 'description' => 'created', + 'subject_type' => 'App\Models\Expense', + 'event' => 'created', + 'subject_id' => $log->module_item_id, + 'causer_type' => 'App\Models\User', + 'causer_id' => 198, + 'properties' => json_encode($data), + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + ]); + + } + + } +} diff --git a/app/Http/Controllers@20230623/Controller.php b/app/Http/Controllers@20230623/Controller.php new file mode 100644 index 0000000..77ec359 --- /dev/null +++ b/app/Http/Controllers@20230623/Controller.php @@ -0,0 +1,12 @@ +id)->where('isOwner',true)->pluck('user_id'); + + $owner= User::find($owner)->first(); + + $tenant= Resident::where('house_id',$house->id)->where('isOwner',false)->pluck('user_id'); + + $tenants= User::find($tenant); + + $payments= Payment::where('house_id',$house->id)->get(); + + $next = House::where('id','>',$house->id)->orderby('id','asc')->first(); + + $previous = House::where('id','<',$house->id)->orderby('id','desc')->first(); + + $maxCount = House::orderby('id','desc')->first()->id; + + return view('houses.detail', compact('owner','tenants', 'payments', 'house', 'next', 'previous', 'maxCount')); + } + + + public function edit(string $id) + { + // + } + + + public function update(Request $request, string $id) + { + // + } + + + public function destroy(string $id) + { + // + } +} diff --git a/app/Http/Controllers@20230623/LoginController.php b/app/Http/Controllers@20230623/LoginController.php new file mode 100644 index 0000000..2e1e6df --- /dev/null +++ b/app/Http/Controllers@20230623/LoginController.php @@ -0,0 +1,31 @@ +only('mobile1', 'password'); + + if (Auth::attempt($credentials)) + { + return redirect('/'); + } + return redirect('/')->with('error','Incorrect Password' ); + } + + public function logout(Request $request) + { + + $request->session()->put('logged_out', true); + + Auth::logout(); + + return redirect('/'); + } +} diff --git a/app/Http/Controllers@20230623/PaymentController.php b/app/Http/Controllers@20230623/PaymentController.php new file mode 100644 index 0000000..6965093 --- /dev/null +++ b/app/Http/Controllers@20230623/PaymentController.php @@ -0,0 +1,259 @@ +pluck('id')->toarray(); + $payments = Payment::sortedData($payments)->get(); + $count = $payments->count(); + $sum = $payments->sum('amount'); + } + else { + return redirect()->route('payments.index')->with('error','Invalid Request'); + } + } + elseif(isset($_GET['start_date']) && isset($_GET['end_date'])) + { + $startdate = strtotime($_GET['start_date']); + $enddate = strtotime($_GET['end_date']); + + if ( $startdate == true && $enddate == true) { + $payments = Payment::Datebetween($_GET['start_date'], $_GET['end_date'])->pluck('id')->toarray(); + $payments = Payment::sortedData($payments)->get(); + $count = $payments->count(); + $sum = $payments->sum('amount'); + } else { + return redirect()->route('payments.index')->with('error','Invalid Request'); + } + } + elseif(isset($_GET['sort'])) + { + $payments= Payment::sort($_GET['sort']); + + $count = $payments->count(); + $sum = $payments->sum('amount'); + + } + elseif(isset($_GET['unpaid'])) + { + $month = $_GET['unpaid']; + + $payments = DB::table('houses') + ->selectRaw('houses.full_address') + ->where('houses.house_type', 'house') + ->whereNotIn('houses.id', function ($query) use ($month) { + $query->select('house_id') + ->from('payments') + ->distinct() + ->where('billingmonth', $month); + })->get(); + + $count = $payments->count(); + foreach ($payments as $payment) { + $array[] = House::where('full_address',$payment->full_address)->first(); + } + + $sum=0; + $payments= collect($array); + } + else + { + $payments = Payment::Monthlyfilter(Carbon::now()->startOfMonth()->format('d-m-Y'))->pluck('id')->toarray(); + $payments = Payment::sortedData($payments)->get(); + $count = $payments->count(); + $sum = $payments->sum('amount'); + } + + return view('payments.index', compact('payments', 'months', 'count', 'sum', 'id')); + } + + + public function create() + { + $houses = House::with('residents')->where('house_type', 'house')->get(); + + $months = config('global.months'); + + $PaymentModes = PaymentMode::get(); + + return view('payments.create', compact('houses', 'months', 'PaymentModes')); + } + + + public function store(Request $req, Payment $payment) + { + $req->validate([ + 'house_id' =>'required', + 'billingmonth' => 'required', + 'payment_modes_id' =>'required', + 'dateofdeposit' => 'required', + 'comments' => 'nullable' + ]); + + if($req['billingmonth'][0] == 'init') + { + + $initialpayment = Payment::where('house_id', $req->house_id)->where('billingmonth','init')->first(); + + if($initialpayment == null) + { + $payment=Payment::create([ + + 'house_id' => $req['house_id'], + 'billingmonth' => $req['billingmonth'][0], + 'amount' => $this->initialpayment, + 'payment_modes_id' => $req->payment_modes_id, + 'dateofdeposit' => Carbon::parse($req->dateofdeposit)->format('d-m-Y'), + 'comments' => $req['comments'], + ]); + + if($req['billingmonth']) + { + foreach($req['billingmonth'] as $month) + { + if(Payment::where('house_id', $req->house_id)->where('billingmonth',$month)->first() == null) + { + $payment=Payment::create([ + + 'house_id' => $req['house_id'], + 'billingmonth' => $month, + 'amount' => $this->monthlypayment, + 'payment_modes_id' => $req->payment_modes_id, + 'dateofdeposit' => Carbon::parse($req->dateofdeposit)->format('d-m-Y'), + 'comments' => $req['comments'] + ]); + } + } + } + return back()->with('success', 'Payment Added Successfully'); + } + } + else + { + foreach($req['billingmonth'] as $month) + { + if(Payment::where('house_id', $req->house_id)->where('billingmonth',$month)->first() == null) + { + $payment=Payment::create([ + 'house_id' => $req['house_id'], + 'billingmonth' => $month, + 'amount' => $this->monthlypayment, + 'payment_modes_id' => $req->payment_modes_id, + 'dateofdeposit' => Carbon::parse($req->dateofdeposit)->format('d-m-Y'), + 'comments' => $req['comments'] + ]); + } + } + return back()->with('success', 'Payment Added Successfully'); + } + } + + + public function show(Payment $payment) + { + // + } + + + public function edit(Payment $payment) + { + $houses = House::with('residents')->where('house_type', 'house')->get(); + + $months = config('global.months'); + + $PaymentModes = PaymentMode::get(); + + return view('payments.edit', compact('payment', 'houses', 'months', 'PaymentModes')); + } + + + public function update(Request $req, Payment $payment) + { + + $attributes= $req->validate([ + 'house_id' =>'required', + 'billingmonth' => 'required', + 'payment_modes_id' =>'required', + 'dateofdeposit' => 'required', + 'comments' => 'nullable' + ]); + + $exists = Payment::where('house_id',$attributes['house_id'])->where('billingmonth',$attributes['billingmonth'] )->first(); + + if($exists) + { + $payment->update([ + 'payment_modes_id' => $req['payment_modes_id'], + 'dateofdeposit' => Carbon::parse($req->dateofdeposit)->format('d-m-Y'), + 'comments' => $req['comments'] + ]); + + return redirect()->route('payments.index')->with('success', 'Payment Edited Succesfully'); + } + + $payment->update([ + 'house_id' => $req['house_id'], + 'billingmonth' => $req['billingmonth'], + 'payment_modes_id' => $req->payment_modes_id, + 'dateofdeposit' => Carbon::parse($req->dateofdeposit)->format('d-m-Y'), + 'comments' => $req['comments'] + ]); + + return redirect()->route('payments.index')->with('success', 'Payment Edited Succesfully'); + } + + public function destroy(Payment $payment) + { + abort_if(auth()->user()->usertype_id != User::ADMIN, 403, 'Access Deined'); + + $payment->delete(); + + return back()->with('success','payment deleted successfully'); + } + + public function ajax(Request $request) + { + $houseId = $request->input('house_id'); + + $payments = Payment::where('house_id', $houseId) + ->with('paymentmode') + ->get() + ->map(function ($payment) { + return [ + 'name' => $payment->paymentmode->name, + 'billingmonth' => $payment->billingmonth, + 'dateofdeposit' => $payment->dateofdeposit + ]; + }); + + $payments = collect($payments)->toArray(); + + return response()->json([ + 'payments' => isset($payments[0]) ? $payments : null + ]); + } +} diff --git a/app/Http/Controllers@20230623/ResidentController.php b/app/Http/Controllers@20230623/ResidentController.php new file mode 100644 index 0000000..8295d7a --- /dev/null +++ b/app/Http/Controllers@20230623/ResidentController.php @@ -0,0 +1,141 @@ +select('residents.*') + ->where('users.name', 'Like',$search.'%') + ->get(); + + } + else { + + $residents=Resident::orderBy('house_id')->get(); + } + + return view('residents.index', compact('residents')); + } + + + public function create($id) + { + $users= User::where('usertype_id',2)->orderby('name','asc')->get(); + + $houses = House::where('house_type', 'house')->get(); + + return view('residents.create', compact('users', 'houses' , 'id')); + } + + public function store(Request $request, Resident $resident) + { + $attributes =$request->validate([ + 'house_id' => 'required', + 'user_id' => 'required', + 'isOwner' => 'required', + 'datofoccupancy' => 'required|date' + ]); + + $resident = Resident::recordExist($attributes)->first(); + + if($resident) + { + return back()->with('error', 'Record Already Exist'); + } + + $owner= Resident::where('house_id', $attributes['house_id'])->where('isOwner', 1)->first(); + + if($owner) + { + if($attributes['isOwner']) + { + + return back()->with('error', 'Owner Already Exist'); + } + } + + Resident::create([ + 'house_id' => $attributes['house_id'], + 'user_id' => $attributes['user_id'], + 'isOwner' => $attributes['isOwner'], + 'datofoccupancy' => Carbon::parse($attributes['datofoccupancy'])->format('d-m-Y') + ]); + + if($request->house) + { + return redirect()->route('houses.show', $request->house)->with('success', 'Resident Added Successfully'); + } + else + { + return redirect()->route('residents.index')->with('success', 'Resident Added Successfully'); + } + } + + public function show(Resident $resident) + { + // + } + + public function edit(Resident $resident) + { + $users= User::where('usertype_id',User::RESIDENT)->orderby('name','asc')->get(); + + $houses = House::where('house_type', 'house')->get(); + + $occupancyTypes = ['0' => 'Tenant', '1' => 'Owner']; + + return view('residents.edit', compact('users', 'resident', 'houses', 'occupancyTypes')); + } + + public function update(Request $request, Resident $resident) + { + $attributes =$request->validate([ + 'house_id' => 'required', + 'isOwner' => 'required', + 'user_id' => 'required', + 'datofoccupancy' => 'required|date' + ]); + + $owner= Resident::where('house_id', $attributes['house_id'])->where('isOwner', 1)->where('id', '!=', $resident->id)->first(); + + if($owner) + { + if($attributes['isOwner']) + { + + return back()->with('error', 'Owner Already Exist'); + } + } + + + $resident->update([ + 'user_id' => $attributes['user_id'], + 'datofoccupancy' => Carbon::parse($attributes['datofoccupancy'])->format('d-m-Y'), + 'house_id' => $attributes['house_id'], + 'isOwner' => $attributes['isOwner'], + ]); + + return redirect()->route('residents.index'); + } + + public function destroy(Resident $resident) + { + $resident->delete(); + + return back()->with('success', 'Record Deleted Successfully'); + } +} diff --git a/app/Http/Controllers@20230623/UserController.php b/app/Http/Controllers@20230623/UserController.php new file mode 100644 index 0000000..ae53959 --- /dev/null +++ b/app/Http/Controllers@20230623/UserController.php @@ -0,0 +1,339 @@ +orderBy('name', 'asc') + ->get(); + + } + + return view('users.index', compact('users')); + } + + + public function create() + { + $usertypes = Usertype::get(); + + return view('users.create', compact('usertypes')); + } + + + public function store(Request $request) + { + $request->validate([ + 'name' => 'required|max:255|min:3', + 'mobile1' => 'required|unique:users,mobile1|gt:0|numeric', + 'mobile2' => 'nullable|unique:users|gt:0|numeric', + 'email' => 'nullable|unique:users|email', + 'password' => 'required|min:8', + 'confirmPassword' => 'required|same:password', + 'usertype_id' => 'required', + ]); + + User::create([ + 'name' => $request->name, + 'password' => Hash::make($request->password), + 'mobile1' => $request->mobile1, + 'mobile2' => $request->mobile2, + 'email' => $request->email, + 'usertype_id' => $request->usertype_id, + ]); + + return redirect()->route('users.index')->with('success', 'User Created Successfully'); + } + + + public function show(string $id) + { + // + } + + + public function edit(User $user) + { + $usertypes = Usertype::get(); + + return view('users.edit', compact('usertypes', 'user')); + } + + + public function update(Request $request, User $user) + { + $user = User::findOrFail($user->id); + + $attributes = $request->validate([ + 'name' => 'required|max:255|min:3', + 'mobile1' => [ + 'required', + 'gt:0', + 'numeric', + Rule::unique('users')->ignore($user), + ], + 'mobile2' => [ + 'nullable', + 'gt:0', + 'numeric', + Rule::unique('users')->ignore($user), + ], + 'email' => [ + 'nullable','email' + ], + 'usertype_id' => 'required' + ]); + + $password = $request->validate([ + 'password' => 'nullable|min:8', + 'confirmPassword' => 'same:password', + ]); + + if(!empty($password['password'])) + { + $user->update([ + 'password' => Hash::make( $password['password']) + ]); + } + + $user->update($attributes); + + return redirect()->route('users.index')->with('success', 'User Updated Successfully'); + } + + + public function destroy($id) + { + $user = User::findOrFail($id); + + if($user->usertype_id == USER::ADMIN) + { + $count = User::where('usertype_id',1)->get()->count(); + if($count > 1) + { + $user->delete(); + return back()->with('success','Admin Deleted Successfully'); + } + else + { + return back()->with('error','Admin Cant Delete Himself'); + } + } + $user->delete(); + + return back()->with('success', 'User Deleted Successfully'); + } + public function home() + { + $house_ids = Auth::user()->houses()->get()->pluck('id'); + $paymentsByMonth = collect(); + + foreach ($house_ids as $house_id) { + $payments = Payment::where('house_id', $house_id) + ->get() + ->groupBy('billingmonth') + ->map(function ($group) { + return $group->sum('amount'); + }); + + $paymentsByMonth = $paymentsByMonth->mergeRecursive($payments); + } + + $paymentsByMonth = $paymentsByMonth->map(function ($values) { + return collect($values)->sum(); + }); + + $paymentsByMonth= $paymentsByMonth->toArray(); + + + return view('users.home',compact('paymentsByMonth')); + } + + public function profileEdit() + { + $usertypes = Usertype::get(); + + $user = Auth::user(); + + return view('users.profileEdit', compact('user', 'usertypes')); + } + + public function profileupdate(Request $request, User $user) + { + + $user = User::findOrFail($user->id); + + $attributes = $request->validate([ + 'name' => 'required|max:255|min:3', + 'mobile1' => [ + 'required', + 'numeric', + 'gt:0', + Rule::unique('users')->ignore($user), + ], + 'mobile2' => [ + 'nullable', + 'numeric', + 'gt:0', + Rule::unique('users')->ignore($user), + ], + 'email' => [ + 'nullable', + 'email', + Rule::unique('users')->ignore($user), + ], + ]); + + $user->update($attributes); + + return redirect()->route('user.home')->with('success', 'Profile Updated Successfully'); + } + public function report() + { + $months = config('global.months'); + + return view('users.report',compact('months')); + } + + public function profile() + { + $user = Auth::user(); + + return view('users.profile' , compact('user')); + } + public function adminProfile() + { + $user = Auth::user(); + + return view('adminprofile' , compact('user')); + } + + public function resetPassword(User $user, Request $request) + { + $request->validate([ + + 'oldPassword' => 'required|min:8', + 'newPassword' => 'required|min:8', + 'confirmPassword' => 'required|same:newPassword|min:8' + ]); + + if (Hash::check($request->oldPassword, $user->password)) + { + $user->update([ + + 'password' => Hash::make($request->newPassword) + ]); + + return back()->with('success', 'Password Changed Successfully'); + } + else + { + return back()->with('error', 'Current Password is Incorrect'); + } + } + public function forgetpassword(Request $request) + { + $user = User::where('mobile1', $request->mobile)->first(); + + if($user) + { + if($user->email) + { + + Notification::send($user, new ForgetPassword($user)); + + return back()->with('success', 'Please Check Your Mail'); + } + else + { + + return back()->with('success', 'Please Contact Admin (XXXX XXX XXX)'); + + } + } + else + { + return back()->with('success', 'Please Enter Registered Number'); + } + } + + public function forget($id) + { + $user= User::where('id',$id)->first(); + + return view('users/forgetpasswordcreate', compact('user')); + } + public function forgetstore(User $user, Request $req) + { + $req->validate([ + 'password' => 'required|min:8', + 'confirmPassword' => 'required|same:password' + ]); + + $user->update([ + 'password' => Hash::make($req->password) + ]); + + return redirect("/")->with('success', 'Password Changed Successfully'); + } + + public function imagestore(Request $request) + { + $this->validate($request, [ + 'image' => 'required|image|mimes:jpg,png,jpeg,gif,svg', + ]); + + $image_path = $request->file('image')->storeAs('public/image', 'UserImage'.time().'.jpg'); + + Auth()->user()->update([ + + 'user_image' => str_replace('public/','',$image_path) + ]); + + return back()->with('success', 'Image Updated Successfully'); + } + + public function resetcreate(User $user) + { + + return view('reset',compact('user')); + } + + public function userresetcreate(User $user) + { + + return view('users.reset',compact('user')); + } + + public function imageDestroy(User $user) { + if($user->user_image){ + $user->update([ + 'user_image' => null + ]); + return back()->with('success','image removed successfully'); + } + return back(); + } +} diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 1fd34bf..7859a64 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -63,9 +63,11 @@ class Kernel extends HttpKernel 'signed' => \App\Http\Middleware\ValidateSignature::class, 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, + ]; protected $routeMiddleware = [ 'userType' => \App\Http\Middleware\UserType::class, + 'disable_back_btn' => \App\Http\Middleware\disablebackbtn::class, ]; } diff --git a/app/Http/Middleware/disablebackbtn.php b/app/Http/Middleware/disablebackbtn.php new file mode 100644 index 0000000..48c6f93 --- /dev/null +++ b/app/Http/Middleware/disablebackbtn.php @@ -0,0 +1,27 @@ +session()->get('logged_out')) { + $response->headers->set('Cache-Control','no-cache, no-store, max-age=0, must-revalidate'); + } + + return $response; + + } +} diff --git a/app/Models/Activity.php b/app/Models/Activity.php new file mode 100644 index 0000000..cbcd193 --- /dev/null +++ b/app/Models/Activity.php @@ -0,0 +1,39 @@ +causer_id)->value('name'); + } + + public function scopeUsermobile() + { + return User::where('id', $this->causer_id)->value('mobile1'); + } + + public function paymentmode($id) + { + return PaymentMode::where('id',$id)->value('name'); + } + public function house($id) + { + return House::where('id',$id)->value('full_address'); + } + public function scopeDatebetween($query, $start, $end) + { + return $query->wherebetween('created_at',[$start, $end])->get(); + } +} + + + diff --git a/app/Models/Activitylog.php b/app/Models/Activitylog.php new file mode 100644 index 0000000..b01b535 --- /dev/null +++ b/app/Models/Activitylog.php @@ -0,0 +1,72 @@ +causer_id)->value('name'); + } + + public function scopeUsermobile() + { + return User::where('id', $this->causer_id)->value('mobile1'); + } + + public function paymentmode($id) + { + return PaymentMode::where('id',$id)->value('name'); + } + public function house($id) + { + return House::where('id',$id)->value('full_address'); + } + + + public function user() + { + return $this->belongsTo(User::class); + } + + public function module() + { + return $this->belongsTo(Module::class); + } + + public function payment() + { + return $this->belongsTo(Payment::class,'module_item_id','id'); + } + public function expense() + { + return $this->belongsTo(Expense::class,'module_item_id','id'); + } + + public function scopeDatebetween($query, $start, $end) + { + return $query->wherebetween('created_at',[$start, $end])->get(); + } +} diff --git a/app/Models/Expense.php b/app/Models/Expense.php index ee99a7e..d704a71 100644 --- a/app/Models/Expense.php +++ b/app/Models/Expense.php @@ -1,38 +1,196 @@ logOnly(['*']); + + + + } + + + public function paymentmode() + { + return $this->belongsto(PaymentMode::class,'payment_modes_id', 'id'); + } - public function scopeSort($query, $sort) + + public function scopeSort($query, $sort, $start , $end, $month) { if($sort == 'Ascending') { - return $query->orderBy(DB::raw("STR_TO_DATE(dateofpayment, '%d-%m-%Y')"), 'asc')->get(); + if(!empty($start) && !empty($end)) + { + return $query->whereBetween( + \DB::raw("STR_TO_DATE(dateofpayment, '%d-%m-%Y')"), + [date('Y-m-d', strtotime($start)), date('Y-m-d', strtotime($end))] + )->orderBy(\DB::raw("STR_TO_DATE(dateofpayment, '%d-%m-%Y')"), 'asc')->get(); + + } + if(!empty($month)) + { + if($month == 'All') + { + return $query->orderBy(\DB::raw("STR_TO_DATE(dateofpayment, '%d-%m-%Y')"), 'asc')->get(); + } + $start = Carbon::createFromFormat('d-m-Y', $month)->startOfMonth(); + $end = $start->copy()->endOfMonth(); + + return $query->whereBetween( + \DB::raw("STR_TO_DATE(dateofpayment, '%d-%m-%Y')"), + [date('Y-m-d', strtotime($start)), date('Y-m-d', strtotime($end))] + )->orderBy(\DB::raw("STR_TO_DATE(dateofpayment, '%d-%m-%Y')"), 'asc')->get(); + } + return $query->whereBetween(\DB::raw("STR_TO_DATE(dateofpayment, '%d-%m-%Y')"), [ + Carbon::now()->startOfMonth()->format('Y-m-d'), + Carbon::now()->endOfMonth()->format('Y-m-d') + ])->orderBy(\DB::raw("STR_TO_DATE(dateofpayment, '%d-%m-%Y')"), 'asc')->get(); + + } - return $query->orderBy(DB::raw("STR_TO_DATE(dateofpayment, '%d-%m-%Y')"), 'desc')->get(); + else + { + if(!empty($start) && !empty($end)) + { + return $query->whereBetween( + \DB::raw("STR_TO_DATE(dateofpayment, '%d-%m-%Y')"), + [date('Y-m-d', strtotime($start)), date('Y-m-d', strtotime($end))] + )->orderBy(\DB::raw("STR_TO_DATE(dateofpayment, '%d-%m-%Y')"), 'desc')->get(); + + } + if(!empty($month)) + { + if($month == 'All') + { + return $query->orderBy(\DB::raw("STR_TO_DATE(dateofpayment, '%d-%m-%Y')"), 'desc')->get(); + } + $start = Carbon::createFromFormat('d-m-Y', $month)->startOfMonth(); + $end = $start->copy()->endOfMonth(); + + return $query->whereBetween( + \DB::raw("STR_TO_DATE(dateofpayment, '%d-%m-%Y')"), + [date('Y-m-d', strtotime($start)), date('Y-m-d', strtotime($end))] + )->orderBy(\DB::raw("STR_TO_DATE(dateofpayment, '%d-%m-%Y')"), 'desc')->get(); + } + return $query->whereBetween(\DB::raw("STR_TO_DATE(dateofpayment, '%d-%m-%Y')"), [ + Carbon::now()->startOfMonth()->format('Y-m-d'), + Carbon::now()->endOfMonth()->format('Y-m-d') + ])->orderBy(\DB::raw("STR_TO_DATE(dateofpayment, '%d-%m-%Y')"), 'desc')->get(); + } + } + + + public function scopeSearch($query, $search) + { + return $query->where('payee', 'LIKE', '%'.$search.'%')->get(); + } + + public function scopeDatebetween($query, $start, $end) + + { + + return $query->whereBetween( + \DB::raw("STR_TO_DATE(dateofpayment, '%d-%m-%Y')"), + [date('Y-m-d', strtotime($start)), date('Y-m-d', strtotime($end))] + )->orderBy(\DB::raw("STR_TO_DATE(dateofpayment, '%d-%m-%Y')"), 'asc')->get(); + + } + public function scopeMonthlyfilter($query, $month) + { + $start = Carbon::createFromFormat('d-m-Y', $month)->startOfMonth(); + $end = $start->copy()->endOfMonth(); + + return $query->whereBetween( + \DB::raw("STR_TO_DATE(dateofpayment, '%d-%m-%Y')"), + [date('Y-m-d', strtotime($start)), date('Y-m-d', strtotime($end))] + )->orderBy(\DB::raw("STR_TO_DATE(dateofpayment, '%d-%m-%Y')"), 'asc')->get(); + } + + + public function doneby() + + { + + return $this->hasManyThrough( + + User::class, + + Activitylog::class, + + 'subject_id', + + 'id', + + 'id', + + 'causer_id' + + )->latest('activity_log.created_at'); + + } + } + diff --git a/app/Models/House.php b/app/Models/House.php index f176275..ff7c142 100644 --- a/app/Models/House.php +++ b/app/Models/House.php @@ -6,6 +6,8 @@ use Illuminate\Database\Eloquent\Model; use App\Models\User; use App\Models\Payment; +use App\Models\Resident; + class House extends Model { @@ -53,13 +55,23 @@ public function scopeAddress($query, $houseid) public function scopeSearch($query, $house) { - return $query->where('Block1','Like' ,'%'.$house.'%') - ->orwhere('Block2','Like' ,'%'.$house.'%') - ->orwhere('house_no','Like' ,'%'.$house.'%')->get(); + return $query->where('full_address','Like' ,'%'.$house.'%')->get(); } public function payments() { return $this->hasMany(Payment::class); } + public function detail() + { + return $this->hasOneThrough( + User::class, + Resident::class, + 'house_id', + 'id', + 'id', + 'user_id' + ); + } + } diff --git a/app/Models/Module.php b/app/Models/Module.php new file mode 100644 index 0000000..621874a --- /dev/null +++ b/app/Models/Module.php @@ -0,0 +1,11 @@ +logOnly(['*']); + } + + + + public function housename() + + { + + return House::where('id', $this->house_id)->value('full_address'); + } + + // public function doneby() + + // { + + // return $this->hasManyThrough( + + // User::class, + + // Activitylog::class, + + // 'subject_id', + + // 'id', + + // 'id', + + // 'causer_id' + + // )->latest('activity_log.created_at'); + + // } + + public function doneby() + + { + + return $this->hasManyThrough( + + User::class, + + Activitylog::class, + + 'subject_id', + + 'id', + + 'id', + + 'causer_id' + + )->latest('activity_log.created_at'); + } + public function houses() + { - return $this->belongsTo(House::class,'house_id', 'id'); + + return $this->belongsTo(House::class, 'house_id', 'id'); } + + public function paymentmode() + { - return $this->belongsto(PaymentMode::class,'payment_modes_id', 'id'); + + return $this->belongsto(PaymentMode::class, 'payment_modes_id', 'id'); } + + public function resident() + { + return $this->belongsTo(Resident::class); } + + public function scopeMonthlyfilter($query, $month) + { + return $query->where('billingmonth', $month)->get(); } + + public function scopeDatebetween($query, $start, $end) + { + return $query->whereBetween( - \DB::raw("STR_TO_DATE(billingmonth, '%d-%m-%Y')"), + + \DB::raw("STR_TO_DATE(dateofdeposit, '%d-%m-%Y')"), + [date('Y-m-d', strtotime($start)), date('Y-m-d', strtotime($end))] + )->get(); } + + public function scopesortedData($query, $payments) + { + return $query->select('payments.*', 'houses.full_address') - ->whereIn('payments.id', $payments) - ->join('houses', 'payments.house_id', '=', 'houses.id') - ->orderBy('houses.block1', 'ASC') - ->orderBy('houses.block2', 'ASC') - ->orderBy('houses.house_no', 'ASC'); -} + + ->whereIn('payments.id', $payments) + + ->join('houses', 'payments.house_id', '=', 'houses.id') + + ->orderBy('houses.block1', 'ASC') + + ->orderBy('houses.block2', 'ASC') + + ->orderBy('houses.house_no', 'ASC'); + } + + + public function scopeSort($query, $sort,$month,$start,$end) + { + + + + if ($sort == 'Ascending') { + + if (!empty($month)) { + if($month=='All') { + return $query->orderByRaw("STR_TO_DATE(dateofdeposit, '%d-%m-%Y') ASC") + ->get(); + } + return $query->where('billingmonth', $month) + ->orderByRaw("STR_TO_DATE(dateofdeposit, '%d-%m-%Y') ASC") + ->get(); + } + if(!empty($start) && !empty($end)) + { + return $query->whereBetween( + \DB::raw("STR_TO_DATE(dateofdeposit, '%d-%m-%Y')"), + [date('Y-m-d', strtotime($start)), date('Y-m-d', strtotime($end))] + ) ->orderByRaw("STR_TO_DATE(dateofdeposit, '%d-%m-%Y') ASC")->get(); + } + + return $query->where('billingmonth', Carbon::now()->startOfMonth()->format('d-m-Y')) + ->orderByRaw("STR_TO_DATE(dateofdeposit, '%d-%m-%Y') ASC") + ->get(); + } else { + if (!empty($month)) { + if($month=='All') { + return $query->orderByRaw("STR_TO_DATE(dateofdeposit, '%d-%m-%Y') DESC") + ->get(); + } + return $query->where('billingmonth', $month) + ->orderByRaw("STR_TO_DATE(dateofdeposit, '%d-%m-%Y') DESC") + ->get(); + } + if(!empty($start) && !empty($end)) + { + return $query->whereBetween( + \DB::raw("STR_TO_DATE(dateofdeposit, '%d-%m-%Y')"), + [date('Y-m-d', strtotime($start)), date('Y-m-d', strtotime($end))] + ) ->orderByRaw("STR_TO_DATE(dateofdeposit, '%d-%m-%Y') DESC")->get(); + } + + return $query->where('billingmonth', Carbon::now()->startOfMonth()->format('d-m-Y')) + ->orderByRaw("STR_TO_DATE(dateofdeposit, '%d-%m-%Y') DESC") + ->get(); + } + + + } + + + public function Owner() + + { + + return $this->hasOneThrough( + + User::class, + + Resident::class, + + 'house_id', + + 'id', + + 'house_id', + + 'user_id' + + ); + } } diff --git a/app/Models/User.php b/app/Models/User.php index 5ac1859..a00a9bd 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -14,6 +14,7 @@ + class User extends Authenticatable { use HasApiTokens, HasFactory, Notifiable; @@ -33,6 +34,7 @@ class User extends Authenticatable 'mobile1', 'mobile2', 'usertype_id', + 'user_image' ]; /** @@ -74,4 +76,9 @@ public function payments() return $this->hasManyThrough(Payment::class, Resident::class,'user_id', 'house_id', 'id','house_id'); } + public function scopesearch($query, $search) + { + return $query->where('name', 'Like' ,$search.'%') + ->orwhere('mobile1', 'Like', '%'.$search.'%')->get(); + } } diff --git a/app/Models@20230623/Activity.php b/app/Models@20230623/Activity.php new file mode 100644 index 0000000..cbcd193 --- /dev/null +++ b/app/Models@20230623/Activity.php @@ -0,0 +1,39 @@ +causer_id)->value('name'); + } + + public function scopeUsermobile() + { + return User::where('id', $this->causer_id)->value('mobile1'); + } + + public function paymentmode($id) + { + return PaymentMode::where('id',$id)->value('name'); + } + public function house($id) + { + return House::where('id',$id)->value('full_address'); + } + public function scopeDatebetween($query, $start, $end) + { + return $query->wherebetween('created_at',[$start, $end])->get(); + } +} + + + diff --git a/app/Models@20230623/Activitylog.php b/app/Models@20230623/Activitylog.php new file mode 100644 index 0000000..b01b535 --- /dev/null +++ b/app/Models@20230623/Activitylog.php @@ -0,0 +1,72 @@ +causer_id)->value('name'); + } + + public function scopeUsermobile() + { + return User::where('id', $this->causer_id)->value('mobile1'); + } + + public function paymentmode($id) + { + return PaymentMode::where('id',$id)->value('name'); + } + public function house($id) + { + return House::where('id',$id)->value('full_address'); + } + + + public function user() + { + return $this->belongsTo(User::class); + } + + public function module() + { + return $this->belongsTo(Module::class); + } + + public function payment() + { + return $this->belongsTo(Payment::class,'module_item_id','id'); + } + public function expense() + { + return $this->belongsTo(Expense::class,'module_item_id','id'); + } + + public function scopeDatebetween($query, $start, $end) + { + return $query->wherebetween('created_at',[$start, $end])->get(); + } +} diff --git a/app/Models@20230623/Expense.php b/app/Models@20230623/Expense.php new file mode 100644 index 0000000..ca4a8d9 --- /dev/null +++ b/app/Models@20230623/Expense.php @@ -0,0 +1,79 @@ +logOnly(['*']); + + } + + public function paymentmode() + { + return $this->belongsto(PaymentMode::class,'payment_modes_id', 'id'); + } + public function scopeSort($query,$sort) + { + if($sort == 'Ascending') + { + return $query->whereBetween(\DB::raw("STR_TO_DATE(dateofpayment, '%d-%m-%Y')"), [ + Carbon::now()->startOfMonth()->format('Y-m-d'), + Carbon::now()->endOfMonth()->format('Y-m-d') + ])->orderBy(\DB::raw("STR_TO_DATE(dateofpayment, '%d-%m-%Y')"), 'asc')->get(); + + + } + return $query->whereBetween(\DB::raw("STR_TO_DATE(dateofpayment, '%d-%m-%Y')"), [ + Carbon::now()->startOfMonth()->format('Y-m-d'), + Carbon::now()->endOfMonth()->format('Y-m-d') + ])->orderBy(\DB::raw("STR_TO_DATE(dateofpayment, '%d-%m-%Y')"), 'desc')->get(); + + } + + public function scopeSearch($query, $search) + { + return $query->where('payee', 'LIKE', '%'.$search.'%')->get(); + } + public function scopeDatebetween($query, $start, $end) + { + return $query->whereBetween( + \DB::raw("STR_TO_DATE(dateofpayment, '%d-%m-%Y')"), + [date('Y-m-d', strtotime($start)), date('Y-m-d', strtotime($end))] + )->get(); + } + + public function doneby() + { + return $this->hasManyThrough( + User::class, + Activitylog::class, + 'subject_id', + 'id', + 'id', + 'causer_id' + )->latest('activity_log.created_at'); + } +} diff --git a/app/Models@20230623/House.php b/app/Models@20230623/House.php new file mode 100644 index 0000000..ff7c142 --- /dev/null +++ b/app/Models@20230623/House.php @@ -0,0 +1,77 @@ +belongsTo(Society::class); + } + + public function residents() + { + return $this->hasMany(Resident::class, 'house_id'); + } + + public function users() + { + return $this->belongsToMany(User::class, 'residents')->withPivot('isOwner', 'datofoccupancy'); + } + + public function scopeAddress($query, $houseid) + { + return $query->where('id', $houseid)->first(); + } + + public function scopeSearch($query, $house) + { + return $query->where('full_address','Like' ,'%'.$house.'%')->get(); + } + public function payments() + { + return $this->hasMany(Payment::class); + } + + public function detail() + { + return $this->hasOneThrough( + User::class, + Resident::class, + 'house_id', + 'id', + 'id', + 'user_id' + ); + } + +} diff --git a/app/Models@20230623/Module.php b/app/Models@20230623/Module.php new file mode 100644 index 0000000..621874a --- /dev/null +++ b/app/Models@20230623/Module.php @@ -0,0 +1,11 @@ +logOnly(['*']); + + } + + public function housename() + { + return House::where('id',$this->house_id)->value('full_address'); + } + // public function doneby() + // { + // return $this->hasManyThrough( + // User::class, + // Activitylog::class, + // 'subject_id', + // 'id', + // 'id', + // 'causer_id' + // )->latest('activity_log.created_at'); + // } + public function doneby() + { + return $this->hasManyThrough( + User::class, + Activitylog::class, + 'subject_id', + 'id', + 'id', + 'causer_id' + )->latest('activity_log.created_at'); + } + public function houses() + { + return $this->belongsTo(House::class,'house_id', 'id'); + } + + public function paymentmode() + { + return $this->belongsto(PaymentMode::class,'payment_modes_id', 'id'); + } + + public function resident() + { + return $this->belongsTo(Resident::class); + } + + public function scopeMonthlyfilter($query, $month) + { + return $query->where('billingmonth', $month)->get(); + } + + public function scopeDatebetween($query, $start, $end) + { + return $query->whereBetween( + \DB::raw("STR_TO_DATE(dateofdeposit, '%d-%m-%Y')"), + [date('Y-m-d', strtotime($start)), date('Y-m-d', strtotime($end))] + )->get(); + } + + public function scopesortedData($query, $payments) + { + return $query->select('payments.*', 'houses.full_address') + ->whereIn('payments.id', $payments) + ->join('houses', 'payments.house_id', '=', 'houses.id') + ->orderBy('houses.block1', 'ASC') + ->orderBy('houses.block2', 'ASC') + ->orderBy('houses.house_no', 'ASC'); + } + + public function scopeSort($query, $sort) + { + if($sort == 'Ascending') + { + return $query->where('billingmonth',Carbon::now()->startOfMonth()->format('d-m-Y'))->orderBy('dateofdeposit', 'asc')->get(); + } + return $query->where('billingmonth',Carbon::now()->startOfMonth()->format('d-m-Y'))->orderBy('dateofdeposit', 'desc')->get(); + + } + + public function Owner() + { + return $this->hasOneThrough( + User::class, + Resident::class, + 'house_id', + 'id', + 'house_id', + 'user_id' + ); + } + + +} diff --git a/app/Models@20230623/PaymentMode.php b/app/Models@20230623/PaymentMode.php new file mode 100644 index 0000000..b153cf0 --- /dev/null +++ b/app/Models@20230623/PaymentMode.php @@ -0,0 +1,12 @@ +where('user_id', $record['user_id']) + ->where('house_id', $record['house_id']) + ->where('isOwner', $record['isOwner']); + } + + public function user() + { + return $this->belongsTo(User::class); + } + + public function house() + { + return $this->belongsTo(House::class); + } + + public function payments() + { + return $this->hasMany(Payment::class); + } + +} diff --git a/app/Models@20230623/Society.php b/app/Models@20230623/Society.php new file mode 100644 index 0000000..1748f14 --- /dev/null +++ b/app/Models@20230623/Society.php @@ -0,0 +1,19 @@ + + */ + protected $fillable = [ + 'name', + 'email', + 'password', + 'mobile1', + 'mobile2', + 'usertype_id', + 'user_image' + ]; + + /** + * The attributes that should be hidden for serialization. + * + * @var array + */ + protected $hidden = [ + 'password', + 'remember_token', + ]; + + /** + * The attributes that should be cast. + * + * @var array + */ + protected $casts = [ + 'email_verified_at' => 'datetime', + ]; + + public function usertype() + { + return $this->belongsTo(Usertype::class); + } + + public function houses() + { + return $this->belongsToMany(House::class, 'residents')->withPivot('isOwner', 'datofoccupancy'); + } + + public function residents() + { + return $this->hasMany(Resident::class); + } + + public function payments() + { + return $this->hasManyThrough(Payment::class, Resident::class,'user_id', 'house_id', 'id','house_id'); + } + + public function scopesearch($query, $search) + { + return $query->where('name', 'Like' ,$search.'%') + ->orwhere('mobile1', 'Like', '%'.$search.'%')->get(); + } +} diff --git a/app/Models@20230623/Usertype.php b/app/Models@20230623/Usertype.php new file mode 100644 index 0000000..f7d8bc8 --- /dev/null +++ b/app/Models@20230623/Usertype.php @@ -0,0 +1,13 @@ +line($this->user->name.' Click On The Following Link To Reset Your Password :') ->action('Reset Password', route('forget', $notifiable->id)) - ->line('Thank you for using our application!'); + ->salutation('Regards, Society Team'); + } /** diff --git a/backup/.editorconfig b/backup/.editorconfig new file mode 100644 index 0000000..8f0de65 --- /dev/null +++ b/backup/.editorconfig @@ -0,0 +1,18 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 4 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false + +[*.{yml,yaml}] +indent_size = 2 + +[docker-compose.yml] +indent_size = 4 diff --git a/backup/.gitignore b/backup/.gitignore new file mode 100644 index 0000000..37d1b0d --- /dev/null +++ b/backup/.gitignore @@ -0,0 +1,23 @@ +/node_modules +/public/hot +/public/storage +/storage/*.key +/vendor +.env.backup +.phpunit.result.cache +docker-compose.override.yml +Homestead.json +Homestead.yaml +npm-debug.log +yarn-error.log +/.idea +/.vscode +/public/css +/public/js +/public/mix-manifest.json +# But not these files... +!/public/assets/* +/public/assets/js +/public/assets/css +/public/assets/vendor +.env diff --git a/backup/.htaccess b/backup/.htaccess new file mode 100644 index 0000000..de21bf9 --- /dev/null +++ b/backup/.htaccess @@ -0,0 +1,5 @@ +AddHandler application/x-httpd-php81 .php .php5 .php4 .php3 + + +Header set Cache-Control "private" + diff --git a/backup/README.md b/backup/README.md new file mode 100644 index 0000000..3ed385a --- /dev/null +++ b/backup/README.md @@ -0,0 +1,66 @@ +

Laravel Logo

+ +

+Build Status +Total Downloads +Latest Stable Version +License +

+ +## About Laravel + +Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as: + +- [Simple, fast routing engine](https://laravel.com/docs/routing). +- [Powerful dependency injection container](https://laravel.com/docs/container). +- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage. +- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent). +- Database agnostic [schema migrations](https://laravel.com/docs/migrations). +- [Robust background job processing](https://laravel.com/docs/queues). +- [Real-time event broadcasting](https://laravel.com/docs/broadcasting). + +Laravel is accessible, powerful, and provides tools required for large, robust applications. + +## Learning Laravel + +Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework. + +You may also try the [Laravel Bootcamp](https://bootcamp.laravel.com), where you will be guided through building a modern Laravel application from scratch. + +If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains over 2000 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library. + +## Laravel Sponsors + +We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel [Patreon page](https://patreon.com/taylorotwell). + +### Premium Partners + +- **[Vehikl](https://vehikl.com/)** +- **[Tighten Co.](https://tighten.co)** +- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)** +- **[64 Robots](https://64robots.com)** +- **[Cubet Techno Labs](https://cubettech.com)** +- **[Cyber-Duck](https://cyber-duck.co.uk)** +- **[Many](https://www.many.co.uk)** +- **[Webdock, Fast VPS Hosting](https://www.webdock.io/en)** +- **[DevSquad](https://devsquad.com)** +- **[Curotec](https://www.curotec.com/services/technologies/laravel/)** +- **[OP.GG](https://op.gg)** +- **[WebReinvent](https://webreinvent.com/?utm_source=laravel&utm_medium=github&utm_campaign=patreon-sponsors)** +- **[Lendio](https://lendio.com)** + +## Contributing + +Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions). + +## Code of Conduct + +In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct). + +## Security Vulnerabilities + +If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed. + +## License + +The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT). diff --git a/backup/app/Console/Kernel.php b/backup/app/Console/Kernel.php new file mode 100644 index 0000000..e6b9960 --- /dev/null +++ b/backup/app/Console/Kernel.php @@ -0,0 +1,27 @@ +command('inspire')->hourly(); + } + + /** + * Register the commands for the application. + */ + protected function commands(): void + { + $this->load(__DIR__.'/Commands'); + + require base_path('routes/console.php'); + } +} diff --git a/backup/app/Exceptions/Handler.php b/backup/app/Exceptions/Handler.php new file mode 100644 index 0000000..b1c262c --- /dev/null +++ b/backup/app/Exceptions/Handler.php @@ -0,0 +1,48 @@ +, \Psr\Log\LogLevel::*> + */ + protected $levels = [ + // + ]; + + /** + * A list of the exception types that are not reported. + * + * @var array> + */ + protected $dontReport = [ + // + ]; + + /** + * A list of the inputs that are never flashed to the session on validation exceptions. + * + * @var array + */ + protected $dontFlash = [ + 'current_password', + 'password', + 'password_confirmation', + ]; + + /** + * Register the exception handling callbacks for the application. + */ + public function register(): void + { + $this->reportable(function (Throwable $e) { + // + }); + } +} diff --git a/backup/app/Http/Controllers/AccountController.php b/backup/app/Http/Controllers/AccountController.php new file mode 100644 index 0000000..2fb45ce --- /dev/null +++ b/backup/app/Http/Controllers/AccountController.php @@ -0,0 +1,400 @@ + "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Pages"], ['name' => "Account Settings"]]; + + if ( auth()->user()->hasRole('super_admin') || auth()->user()->hasRole('admin')) { + $pageConfigs = [ + 'pageHeader' => false, + ]; + } else { + $pageConfigs = [ + 'pageHeader' => false, + 'mainLayoutType' => 'subscriber', + 'showMenu' => false + ]; + } + + $userMeta = []; + $userMetaRecords = UserMeta::where('user_id', auth()->user()->id)->get(); + foreach ($userMetaRecords as $meta) { + $userMeta[$meta->meta_key] = $meta->meta_value; + } + + $userAddress = auth()->user()->address('institution_address'); + + return view('account/index', [ + 'breadcrumbs' => $breadcrumbs, + 'pageConfigs' => $pageConfigs, + 'userMeta' => $userMeta, + 'userAddress' => $userAddress + ]); + } + + public function changePassword() + { + $user = auth()->user(); + + request()->validate([ + 'current_password' => [ + 'required', + function ($attribute, $value, $fail) use ($user) { + if (!Hash::check($value, $user->password)) { + $fail('Your current password is incorrect.'); + } + }, + ], + 'password' => 'required|min:6|confirmed', + ]); + + $user->password = bcrypt(request()->get('password')); + $user->save(); + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'message' => 'Password changed successfully', + 'title' => 'Congatulations!' + ]); + } + + public function changeEmail(Request $request) + { + $user = auth()->user(); + + request()->validate([ + 'email' => [ + 'required', + 'email', + 'confirmed', + 'unique:users,email,' . $user->id + ] + ]); + + $user->email_verified_at = null; + $user->email = request()->get('email'); + $user->save(); + + // Send Email verification + $request->user()->sendEmailVerificationNotification(); + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations!', + 'message' => 'Your email address has changed. Please verify your new email address.' + ]); + } + + public function subscribeToNewsletter(Request $request) + { + $request->validate([ + 'email' => 'required|email' + ]); + + try { + $user = auth()->user(); + Newsletter::subscribeOrUpdate( $request->email, ['FNAME'=> $user->name, 'LNAME'=> $user->last_name] ); + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations!', + 'message' => 'You have subscribed to ' . config('app.name') . ' News & Events successfully.' + ]); + } catch(\Exception $e) { + logger("Mailchimp API Error: " . $e->getMessage()); + return response()->json([ + 'success' => false, + 'title' => 'Oops!', + 'message' => 'Something went wrong.' + ]); + } + } + + public function updateBasicInformation(Request $request) + { + $user = auth()->user(); + request()->validate([ + 'name' => 'required|string|max:255', + 'last_name' => 'required|string|max:255', + 'timezone' => 'required' + ]); + + $user->name = request()->get('name'); + $user->last_name = request()->get('last_name'); + $user->timezone = request()->get('timezone'); + $user->can_contact = $request->has('can_contact') ? true : false; + $user->save(); + + $user->updateOrCreateMeta(USER::EMAIL_NOTIFICATION, request()->has('email_notification') ? true : false); + $user->updateOrCreateMeta("areas_of_interest", json_encode($request->areas_of_interest ?? [])); + $user->updateOrCreateMeta(User::SUBSCRIBE_NEWSLETTER, $request->has('newsletter') ? 1 : 0); + $user->updateOrCreateMeta(User::EMAIL_NOTIFICATION, $request->has('email_notification') ? 1 : 0); + + try { + if($request->has('newsletter')) { + Newsletter::subscribeOrUpdate( $user->email, ['FNAME'=> $user->name, 'LNAME'=> $user->last_name] ); + } else { + Newsletter::unsubscribe($user->email); + } + } catch(\Exception $e) { + logger("Mailchimp API Error: " . $e->getMessage()); + } + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations!', + 'message' => 'Changes saved successfully.' + ]); + } + + public function institutionInfo(Request $request) + { + $user = auth()->user(); + + request()->validate([ + 'institution_name' => 'required|string|max:255', + 'department' => 'required|string|max:255', + 'street_name' => 'required|max:500', + 'city' => 'required|max:255', + 'state' => 'required|max:255', + 'postal_code' => 'required|max:255', + 'country' => 'required|max:255', + ]); + + $user->updateOrCreateMeta("institution_name", $request->institution_name); + $user->updateOrCreateMeta("department", $request->department); + + // Address + $user->updateOrCreateAddress("institution_address", [ + "street_name" => $request->street_name, + "city" => $request->city, + "state" => $request->state, + "postal_code" => $request->postal_code, + "country" => $request->country, + ]); + + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations!', + 'message' => 'Changes saved successfully.' + ]); + } + + public function setup(Request $request) + { + if (auth()->user()->subscribed('default')) { + return redirect(route('home')); + } + switch (request()->method()) { + case 'GET': + $pageConfigs = [ + 'bodyClass' => "bg-full-screen-image", + 'blankPage' => true + ]; + + $userMeta = []; + $userMetaRecords = UserMeta::where('user_id', auth()->user()->id)->get(); + foreach ($userMetaRecords as $meta) { + $userMeta[$meta->meta_key] = $meta->meta_value; + } + + $userAddress = auth()->user()->address('institution_address'); + + $membershipLevels = MembershipLevel::where('parent_id', 0)->get(); + + return view('/account/setup', [ + 'pageConfigs' => $pageConfigs, + 'userMeta' => $userMeta, + 'userAddress' => $userAddress, + 'membershipLevels' => $membershipLevels + ]); + + break; + + case 'POST': + + if (!auth()->user()->hasVerifiedEmail()) { + return response()->json([ + 'success' => false, + 'code' => 'error', + 'title' => 'Oops!', + 'message' => 'Your email address is not verified.', + ]); + } + $request->validate([ + 'institution_name' => 'required|string|max:255' + ]); + + $user = auth()->user(); + $user->can_contact = $request->has('can_contact') ? true : false; + $user->save(); + + $user->updateOrCreateMeta("institution_name", $request->institution_name); + $user->updateOrCreateMeta("department", $request->department); + $user->updateOrCreateMeta("areas_of_interest", json_encode($request->areas_of_interest ?? [])); + + $user->updateOrCreateMeta("hear_about_us", request()->has('hear_us_other') ? $request->hear_us_other : $request->hear_about_us); + $user->updateOrCreateMeta(User::SUBSCRIBE_NEWSLETTER, $request->has('newsletter') ? 1 : 0); + $user->updateOrCreateMeta(User::EMAIL_NOTIFICATION, $request->has('email_notification') ? 1 : 0); + + try { + if($request->has('newsletter')) { + Newsletter::subscribeOrUpdate( $user->email, ['FNAME'=> $user->name, 'LNAME'=> $user->last_name] ); + } else { + Newsletter::unsubscribe($user->email); + } + } catch(\Exception $e) { + logger("Mailchimp API Error " . $e->getMessage()); + } + + // Address + $user->updateOrCreateAddress("institution_address", [ + "street_name" => $request->street_name, + "city" => $request->city, + "state" => $request->state, + "postal_code" => $request->postal_code, + "country" => $request->country, + ]); + + $membershipLevels = []; + foreach (MembershipLevel::all()->toArray() as $record) { + $membershipLevels[$record['id']] = $record; + } + + // Membership Level + for ($i = 1; $i <= 3; $i++) { + $key = 'membership_level_' . $i; + + UserMeta::where([ + 'meta_key' => $key, + 'user_id' => $user->id + ])->delete(); + + $level = request()->get($key); + if (!empty($level)) { + $lastLevel = $level; + $value = $membershipLevels[$level]; + if ($membershipLevels[$level]['required_textbox']) { + $value['other_value'] = request()->get('membership_input_' . $level); + } + $user->updateOrCreateMeta($key, json_encode($value)); + } + } + + // Check if eligible for discount + $membershipLevel = MembershipLevel::find($lastLevel); + + $priceId = auth()->user()->getPriceId(); + + if($priceId == false) { + return response()->json([ + 'success' => false, + 'code' => 'error', + 'title' => 'Oops!', + 'message' => 'Please select your membership level.' + ]); + } + + $checkout = auth()->user()->newSubscription(Helper::SUBSCRIPTION_DEFAULT, $priceId) + ->allowPromotionCodes() + ->checkout([ + 'success_url' => route('home'), + 'cancel_url' => route('subscriber.setup'), + 'billing_address_collection' => 'required', + ]); + + + return view('inc/stripe/btn', compact('checkout')); + + break; + } + } + + public function membershipLevels($parentId) + { + return MembershipLevel::where('parent_id', $parentId)->get(); + } + + public function pendingAccount() + { + $pageConfigs = [ + 'bodyClass' => "bg-full-screen-image", + 'blankPage' => true + ]; + return view('account/pending', compact('pageConfigs')); + } + + public function applyAsPresenter(Request $request) + { + switch ($request->method()) { + case 'GET': + $user = auth()->user(); + $pageConfigs = ['blankPage' => true, 'mainLayoutType' => 'subscriber', 'showMenu' => false]; + $userMeta = []; + $userMetaRecords = UserMeta::where('user_id', $user->id)->get(); + foreach ($userMetaRecords as $meta) { + $userMeta[$meta->meta_key] = $meta->meta_value; + } + $userAddress = $user->address('institution_address'); + return view('content.presenters.apply', compact('user', 'userAddress', 'userMeta', 'pageConfigs')); + // return view('content.presenters.apply', [ + // 'user' => $user, + // 'userAddress' => $userAddress, + // 'userMeta' => $userMeta, + // 'pageConfigs' => $pageConfigs, + // ]); + break; + + case 'POST': + $request->validate([ + 'institution_name' => 'required|string|max:255', + 'department' => 'required|string|max:255', + 'about_presentation' => 'required|string', + ]); + + $user = auth()->user(); + + $user->updateOrCreateMeta("institution_name", $request->institution_name); + $user->updateOrCreateMeta("department", $request->department); + $user->updateOrCreateMeta("about_presentation", $request->about_presentation); + $user->updateOrCreateMeta("presentation_keywords", json_encode($request->presentation_keywords ?? [])); + + if ($request->has('is_published')) { + $user->updateOrCreateMeta("presentation_published_info", $request->presentation_published_info ?? ""); + } + + // Address + $user->updateOrCreateAddress("institution_address", [ + "street_name" => $request->street_name, + "city" => $request->city, + "state" => $request->state, + "postal_code" => $request->postal_code, + "country" => $request->country, + ]); + + $user->assignRole('presenter'); + + return redirect(route('user.account-pending')); + + break; + } + } +} diff --git a/backup/app/Http/Controllers/ActivityController.php b/backup/app/Http/Controllers/ActivityController.php new file mode 100644 index 0000000..bd04566 --- /dev/null +++ b/backup/app/Http/Controllers/ActivityController.php @@ -0,0 +1,152 @@ + User::orderBy('name', 'asc')->get(), + ]); + } + + /** + * Display a listing of the resource. + * + * @return \Illuminate\Http\Response + */ + public function index() + { + $breadcrumbs = [ + ['link' => "admin.home", 'name' => "Dashboard"], ['name' => 'User Activities'] + ]; + + $pageConfigs = [ + //'pageHeader' => false, + //'contentLayout' => "content-left-sidebar", + ]; + + $records = Activity::where('id', '!=', 0); + if (request()->ajax()) { + + if (request()->has('user_id') && !empty(request()->get('user_id'))) { + $records->where('activity_log.causer_id', request()->get('user_id')); + } + + + return Datatables::of($records) + ->editColumn('created_at', function ($row) { + return date("d M Y h:i A", strtotime($row->created_at)); + }) + ->editColumn('description', function ($row) { + if (!is_null($row->subject_type) && !empty($row->subject_type)) { + $arr = explode("\\", $row->subject_type); + $on = $arr[count($arr) - 1]; + $on = ucfirst($on); + } else { + $on = ''; + } + return ucfirst($row->description) . ' ' . $on; + }) + ->editColumn('ip_address', function ($row) { + return $row->ip_address ?? "N/A"; + }) + ->editColumn('properties', function($row) { + if($row->properties == "[]") { + return "N/A"; + } + $link = route('super-admin.user_activities.show', $row->id); + return ""; + }) + ->addColumn('user', function ($row) { + if( is_null($row->causer_id)) { + return "N/A"; + } + $user = User::where('id', $row->causer_id)->first(); + if($user) { + return $user->fullName(); + } + return "N/A"; + }) + ->rawColumns(['user', 'properties']) + ->make(true); + } else { + return view('content.activities.index', compact('breadcrumbs', 'pageConfigs')); + } + } + + /** + * Show the form for creating a new resource. + * + * @return \Illuminate\Http\Response + */ + public function create() + { + // + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function store(Request $request) + { + // + } + + /** + * Display the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function show($id) + { + $record = Activity::findOrFail($id); + dd( json_decode($record->properties, true) ); + return view('content.activities.show', compact('record')); + } + + /** + * Show the form for editing the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function edit($id) + { + // + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param int $id + * @return \Illuminate\Http\Response + */ + public function update(Request $request, $id) + { + // + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function destroy($id) + { + // + } +} diff --git a/backup/app/Http/Controllers/AdminController.php b/backup/app/Http/Controllers/AdminController.php new file mode 100644 index 0000000..9cc1208 --- /dev/null +++ b/backup/app/Http/Controllers/AdminController.php @@ -0,0 +1,205 @@ +count(); + $sum = $expenses->sum('amount'); + } + elseif(isset($_GET['search'])) + { + $expenses= Expense::search($_GET['search']); + $count = $expenses->count(); + $sum = $expenses->sum('amount'); + } + elseif(isset($_GET['start_date']) && isset($_GET['end_date'])) + { + $startdate = strtotime($_GET['start_date']); + $enddate = strtotime($_GET['end_date']); + + if ( $startdate == true && $enddate == true) { + $expenses = Expense::Datebetween($_GET['start_date'], $_GET['end_date']); + $count = $expenses->count(); + $sum = $expenses->sum('amount'); + } else { + return redirect()->route('payments.index')->with('error','Invalid Request'); + } + } + else + { + $expenses= Expense::get(); + $count = $expenses->count(); + $sum = $expenses->sum('amount'); + } + + return view('admins.index', compact('expenses','sum', 'count','id')); + } + + public function create() + { + $PaymentModes = PaymentMode::get(); + + return view('admins.expense', compact('PaymentModes')); + } + + public function store(Request $req) + { + $messages = [ + 'payee.required' => 'The name field is required.', + 'payee.min' => 'The name field must be at least 3 characters.', + 'payee.max' => 'The name may not be greater than 255 characters.', + 'amount.required' => 'The amount field is required.', + 'amount.gt' => 'The amount field must be a number greater than zero .', + 'payment_modes_id.required' => 'The payment mode field is required.', + ]; + $attributes= $req->validate([ + 'payee' =>'required|min:3|max:255', + 'amount' => 'required|gt:0', + 'comments' => 'nullable', + 'payment_modes_id' =>'required', + 'dateofpayment' => 'required|date', + ], $messages); + + $expense=Expense::create([ + 'payee' => $attributes['payee'], + 'amount' => $attributes['amount'], + 'comments' => $attributes['comments'], + 'payment_modes_id' =>$attributes['payment_modes_id'], + 'dateofpayment' => Carbon::parse($attributes['dateofpayment'])->format('d-m-Y'), + ]); + + Activitylog::create([ + 'user_id' => Auth::user()->id, + 'action' => 'Created', + 'module_id' => 2, + 'module_item_id' => $expense->id + ]); + + return back()->with('success', 'Expenses Added Successfully'); + } + + + public function report(Request $request) + { + $month = $request->input('month'); + + $houses = House::whereHas('payments', function($query) use ($month) { + $query->where('billingmonth', $month); + })->get()->toArray(); + + return ['houses' => $houses]; + } + + + public function show(string $id) + { + // + } + + + public function edit(Expense $expense) + { + $PaymentModes = PaymentMode::get(); + + return view('admins.edit', compact('expense', 'PaymentModes')); + } + + public function update(Request $request, Expense $expense) + { + $messages = [ + 'payee.required' => 'The name field is required.', + 'payee.min' => 'The name field must be at least 3 characters.', + 'payee.max' => 'The name may not be greater than 255 characters.', + 'amount.required' => 'The amount field is required.', + 'amount.gt' => 'The amount field must be a number greater than zero .', + 'payment_modes_id.required' => 'The payment mode field is required.', + ]; + $attributes= $request->validate([ + 'payee' =>'required|min:3|max:255', + 'amount' => 'required|gt:0', + 'comments' => 'nullable', + 'payment_modes_id' =>'required', + 'dateofpayment' => 'required|date', + ],$messages); + + $expense->update([ + 'payee' => $attributes['payee'], + 'amount' => $attributes['amount'], + 'comments' => $attributes['comments'], + 'payment_modes_id' =>$attributes['payment_modes_id'], + 'dateofpayment' => Carbon::parse($attributes['dateofpayment'])->format('d-m-Y'), + ]); + + Activitylog::create([ + 'user_id' => Auth::user()->id, + 'action' => 'Updated', + 'module_id' => 2, + 'module_item_id' => $expense->id + ]); + + return redirect()->route('expenses.index')->with('success', 'Expenses Updated Successfully'); + } + + + public function destroy(Expense $expense) + { + abort_if(auth()->user()->usertype_id != User::ADMIN, 403, 'Access Deined'); + + Activitylog::create([ + 'user_id' => Auth::user()->id, + 'action' => 'Deleted', + 'module_id' => 2, + 'module_item_id' => $expense->id + ]); + + $expense->delete(); + + return back()->with('success','expense deleted successfully'); + } + + public function loginsertion() + { + $ids= Payment::get()->pluck('id')->toArray(); + + foreach($ids as $id) + { + Activitylog::create([ + 'user_id' => 198, + 'action' => 'Created', + 'module_id' => 1, + 'module_item_id' => $id + ]); + } + + + $ids= Expense::get()->pluck('id')->toArray(); + + foreach($ids as $id) + { + Activitylog::create([ + 'user_id' => 198, + 'action' => 'Created', + 'module_id' => 2, + 'module_item_id' => $id + ]); + } + } +} diff --git a/backup/app/Http/Controllers/AdminController.php@20230512 b/backup/app/Http/Controllers/AdminController.php@20230512 new file mode 100644 index 0000000..0a34306 --- /dev/null +++ b/backup/app/Http/Controllers/AdminController.php@20230512 @@ -0,0 +1,176 @@ +count(); + $sum = $expenses->sum('amount'); + } + elseif(isset($_GET['search'])) + { + $expenses= Expense::search($_GET['search']); + $count = $expenses->count(); + $sum = $expenses->sum('amount'); + } + elseif(isset($_GET['start_date']) && isset($_GET['end_date'])) + { + $startdate = strtotime($_GET['start_date']); + $enddate = strtotime($_GET['end_date']); + + if ( $startdate == true && $enddate == true) { + $expenses = Expense::Datebetween($_GET['start_date'], $_GET['end_date']); + $count = $expenses->count(); + $sum = $expenses->sum('amount'); + } else { + return redirect()->route('payments.index')->with('error','Invalid Request'); + } + } + else + { + $expenses= Expense::get(); + $count = $expenses->count(); + $sum = $expenses->sum('amount'); + } + + return view('admins.index', compact('expenses','sum', 'count','id')); + } + + public function create() + { + $PaymentModes = PaymentMode::get(); + + return view('admins.expense', compact('PaymentModes')); + } + + public function store(Request $req) + { + $messages = [ + 'payee.required' => 'The name field is required.', + 'payee.min' => 'The name field must be at least 3 characters.', + 'payee.max' => 'The name may not be greater than 255 characters.', + 'amount.required' => 'The amount field is required.', + 'amount.gt' => 'The amount field must be a number greater than zero .', + 'payment_modes_id.required' => 'The payment mode field is required.', + ]; + $attributes= $req->validate([ + 'payee' =>'required|min:3|max:255', + 'amount' => 'required|gt:0', + 'comments' => 'nullable', + 'payment_modes_id' =>'required', + 'dateofpayment' => 'required|date', + ], $messages); + + $expense=Expense::create([ + 'payee' => $attributes['payee'], + 'amount' => $attributes['amount'], + 'comments' => $attributes['comments'], + 'payment_modes_id' =>$attributes['payment_modes_id'], + 'dateofpayment' => Carbon::parse($attributes['dateofpayment'])->format('d-m-Y'), + ]); + + Activitylog::create([ + 'user_id' => Auth::user()->id, + 'action' => 'Created', + 'module_id' => 2, + 'module_item_id' => $expense->id + ]); + + return back()->with('success', 'Expenses Added Successfully'); + } + + + public function report(Request $request) + { + $month = $request->input('month'); + + $houses = House::whereHas('payments', function($query) use ($month) { + $query->where('billingmonth', $month); + })->get()->toArray(); + + return ['houses' => $houses]; + } + + + public function show(string $id) + { + // + } + + + public function edit(Expense $expense) + { + $PaymentModes = PaymentMode::get(); + + return view('admins.edit', compact('expense', 'PaymentModes')); + } + + public function update(Request $request, Expense $expense) + { + $messages = [ + 'payee.required' => 'The name field is required.', + 'payee.min' => 'The name field must be at least 3 characters.', + 'payee.max' => 'The name may not be greater than 255 characters.', + 'amount.required' => 'The amount field is required.', + 'amount.gt' => 'The amount field must be a number greater than zero .', + 'payment_modes_id.required' => 'The payment mode field is required.', + ]; + $attributes= $request->validate([ + 'payee' =>'required|min:3|max:255', + 'amount' => 'required|gt:0', + 'comments' => 'nullable', + 'payment_modes_id' =>'required', + 'dateofpayment' => 'required|date', + ],$messages); + + $expense->update([ + 'payee' => $attributes['payee'], + 'amount' => $attributes['amount'], + 'comments' => $attributes['comments'], + 'payment_modes_id' =>$attributes['payment_modes_id'], + 'dateofpayment' => Carbon::parse($attributes['dateofpayment'])->format('d-m-Y'), + ]); + + Activitylog::create([ + 'user_id' => Auth::user()->id, + 'action' => 'Updated', + 'module_id' => 2, + 'module_item_id' => $expense->id + ]); + + return redirect()->route('expenses.index')->with('success', 'Expenses Updated Successfully'); + } + + + public function destroy(Expense $expense) + { + abort_if(auth()->user()->usertype_id != User::ADMIN, 403, 'Access Deined'); + + Activitylog::create([ + 'user_id' => Auth::user()->id, + 'action' => 'Deleted', + 'module_id' => 2, + 'module_item_id' => $expense->id + ]); + + $expense->delete(); + + return back()->with('success','expense deleted successfully'); + } +} diff --git a/backup/app/Http/Controllers/AgoraRecordingController.php b/backup/app/Http/Controllers/AgoraRecordingController.php new file mode 100644 index 0000000..c29ed4c --- /dev/null +++ b/backup/app/Http/Controllers/AgoraRecordingController.php @@ -0,0 +1,113 @@ +token = $event->generateToken(); + + $uid = "123429836"; + + $uid = random_int(100000000, 999999999); + $uid = (string)$uid; + + $recording = new Recording(); + + // 1. Acquire Resource ID + $rid = $recording->acquire($event->channel_name, $uid); + + // 2. Start Recording + $r = $recording->start($event->channel_name, $uid, $event->token, $rid); + $rid = $r['resourceId'] ?? ""; + $sid = $r['sid'] ?? ""; + if( !empty($rid) && !empty($sid) ) { + // Save ResourceID, SID to database for finding recorded files later. + $eventRecording = EventRecording::create([ + 'event_id' => $event->id, + 'rid' => $r['resourceId'], + 'sid' => $r['sid'], + 'uid' => $uid, + 'status' => 'start', + ]); + return response()->json([ + 'success' => true, + 'body' => $r + ]); + } else { + + return response()->json([ + 'success' => false, + 'message' => $r + ]); + } + } + + public function status() + { + $recording = new Recording(); + $response = $recording->status( request()->get('rid'), request()->get('sid') ); + + $eventRecording = EventRecording::where([ + 'rid' => request()->get('rid'), + 'sid' => request()->get('sid'), + ])->first(); + + $eventRecording->file_lists = json_encode($response['serverResponse']); + $eventRecording->status = 'progress'; + $eventRecording->save(); + + return response()->json($response); + } + + public function stopRecording($id) + { + $event = Event::find($id); + + $eventRecording = EventRecording::where([ + 'rid' => request()->get('resourceId'), + 'sid' => request()->get('sid'), + 'event_id' => $event->id + ])->first(); + + $recording = new Recording(); + + $stopResponse = $recording->stop( + $event->channel_name, + $eventRecording->uid, + $eventRecording->rid, + $eventRecording->sid + ); + + $rid = $stopResponse['resourceId'] ?? ""; + $sid = $stopResponse['sid'] ?? ""; + if(!empty($rid) && !empty($sid) && isset($stopResponse['serverResponse'])) { + $eventRecording->file_lists = json_encode($stopResponse['serverResponse'] ?? null); + $eventRecording->status = 'stop'; + $eventRecording->save(); + + // Run save recording command. + \Artisan::call('event:save-recordings'); + } + return response()->json($stopResponse); + } + + public function saveRecordings() + { + \Artisan::call('event:save-recordings'); + echo \Artisan::output(); + } + +} diff --git a/backup/app/Http/Controllers/AppsController.php b/backup/app/Http/Controllers/AppsController.php new file mode 100644 index 0000000..595cf1a --- /dev/null +++ b/backup/app/Http/Controllers/AppsController.php @@ -0,0 +1,211 @@ + false]; + + return view('/content/apps/invoice/invoice-list', ['pageConfigs' => $pageConfigs]); + } + + // invoice preview App + public function invoice_preview() + { + $pageConfigs = ['pageHeader' => false]; + + return view('/content/apps/invoice/invoice-preview', ['pageConfigs' => $pageConfigs]); + } + + // invoice edit App + public function invoice_edit() + { + $pageConfigs = ['pageHeader' => false]; + + return view('/content/apps/invoice/invoice-edit', ['pageConfigs' => $pageConfigs]); + } + + // invoice edit App + public function invoice_add() + { + $pageConfigs = ['pageHeader' => false]; + + return view('/content/apps/invoice/invoice-add', ['pageConfigs' => $pageConfigs]); + } + + // invoice print App + public function invoice_print() + { + $pageConfigs = ['pageHeader' => false]; + + return view('/content/apps/invoice/invoice-print', ['pageConfigs' => $pageConfigs]); + } + + // User List Page + public function user_list() + { + $pageConfigs = ['pageHeader' => false]; + return view('/content/apps/user/app-user-list', ['pageConfigs' => $pageConfigs]); + } + + // User View Page + public function user_view() + { + $pageConfigs = ['pageHeader' => false]; + return view('/content/apps/user/app-user-view', ['pageConfigs' => $pageConfigs]); + } + + // User Edit Page + public function user_edit() + { + $pageConfigs = ['pageHeader' => false]; + return view('/content/apps/user/app-user-edit', ['pageConfigs' => $pageConfigs]); + } + + // Chat App + public function chatApp() + { + $pageConfigs = [ + 'pageHeader' => false, + 'contentLayout' => "content-left-sidebar", + 'pageClass' => 'chat-application', + ]; + + return view('/content/apps/chat/app-chat', [ + 'pageConfigs' => $pageConfigs + ]); + } + + // Calender App + public function calendarApp() + { + $pageConfigs = [ + 'pageHeader' => false + ]; + + return view('/content/apps/calendar/app-calendar', [ + 'pageConfigs' => $pageConfigs + ]); + } + + // Email App + public function emailApp() + { + $pageConfigs = [ + 'pageHeader' => false, + 'contentLayout' => "content-left-sidebar", + 'pageClass' => 'email-application', + ]; + + return view('/content/apps/email/app-email', ['pageConfigs' => $pageConfigs]); + } + // ToDo App + public function todoApp() + { + $pageConfigs = [ + 'pageHeader' => false, + 'contentLayout' => "content-left-sidebar", + 'pageClass' => 'todo-application', + ]; + + return view('/content/apps/todo/app-todo', [ + 'pageConfigs' => $pageConfigs + ]); + } + // File manager App + public function file_manager() + { + $pageConfigs = [ + 'pageHeader' => false, + 'contentLayout' => "content-left-sidebar", + 'pageClass' => 'file-manager-application', + ]; + + return view('/content/apps/fileManager/app-file-manager', ['pageConfigs' => $pageConfigs]); + } + + // Kanban App + public function kanbanApp() + { + $pageConfigs = [ + 'pageHeader' => false, + 'pageClass' => 'kanban-application', + ]; + + return view('/content/apps/kanban/app-kanban', ['pageConfigs' => $pageConfigs]); + } + + // Ecommerce Shop + public function ecommerce_shop() + { + $pageConfigs = [ + 'contentLayout' => "content-detached-left-sidebar", + 'pageClass' => 'ecommerce-application', + ]; + + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "eCommerce"], ['name' => "Shop"] + ]; + + return view('/content/apps/ecommerce/app-ecommerce-shop', [ + 'pageConfigs' => $pageConfigs, + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Ecommerce Details + public function ecommerce_details() + { + $pageConfigs = [ + 'pageClass' => 'ecommerce-application', + ]; + + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "eCommerce"], ['link' => "/app/ecommerce/shop", 'name' => "Shop"], ['name' => "Details"] + ]; + + return view('/content/apps/ecommerce/app-ecommerce-details', [ + 'pageConfigs' => $pageConfigs, + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Ecommerce Wish List + public function ecommerce_wishlist() + { + $pageConfigs = [ + 'pageClass' => 'ecommerce-application', + ]; + + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "eCommerce"], ['name' => "Wish List"] + ]; + + return view('/content/apps/ecommerce/app-ecommerce-wishlist', [ + 'pageConfigs' => $pageConfigs, + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Ecommerce Checkout + public function ecommerce_checkout() + { + $pageConfigs = [ + 'pageClass' => 'ecommerce-application', + ]; + + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "eCommerce"], ['name' => "Checkout"] + ]; + + return view('/content/apps/ecommerce/app-ecommerce-checkout', [ + 'pageConfigs' => $pageConfigs, + 'breadcrumbs' => $breadcrumbs + ]); + } +} diff --git a/backup/app/Http/Controllers/Auth/ConfirmPasswordController.php b/backup/app/Http/Controllers/Auth/ConfirmPasswordController.php new file mode 100644 index 0000000..9e93a1b --- /dev/null +++ b/backup/app/Http/Controllers/Auth/ConfirmPasswordController.php @@ -0,0 +1,40 @@ +middleware('auth'); + } +} diff --git a/backup/app/Http/Controllers/Auth/ForgotPasswordController.php b/backup/app/Http/Controllers/Auth/ForgotPasswordController.php new file mode 100644 index 0000000..c288267 --- /dev/null +++ b/backup/app/Http/Controllers/Auth/ForgotPasswordController.php @@ -0,0 +1,44 @@ +middleware('guest'); + } + + public function showLinkRequestForm(){ + $pageConfigs = [ + 'bodyClass' => "bg-full-screen-image", + 'blankPage' => true + ]; + + return view('/auth/passwords/email', [ + 'pageConfigs' => $pageConfigs + ]); + } +} diff --git a/backup/app/Http/Controllers/Auth/LoginController.php b/backup/app/Http/Controllers/Auth/LoginController.php new file mode 100644 index 0000000..58ae08c --- /dev/null +++ b/backup/app/Http/Controllers/Auth/LoginController.php @@ -0,0 +1,109 @@ +middleware('guest')->except('logout'); + } + + // Login + public function showLoginForm(){ + $pageConfigs = [ + 'bodyClass' => "bg-full-screen-image", + 'blankPage' => true + ]; + + return view('/auth/login', [ + 'pageConfigs' => $pageConfigs + ]); + } + + /** + * Log the user out of the application. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function logout(Request $request) + { + $this->guard()->logout(); + + $request->session()->invalidate(); + + return $this->loggedOut($request) ?: redirect('/login'); + } + + /** + * The user has been authenticated. + * + * @param \Illuminate\Http\Request $request + * @param mixed $user + * @return mixed + */ + protected function authenticated(Request $request, $user) + { + if($user->hasRole('presenter')) { + if(!$user->approved() || !$user->hasVerifiedEmail()) { + return redirect(route("user.account-pending")); + } + } + + + + } + + public function redirectTo() + { + if(auth()->user()->hasRole('super_admin')) { + return route('events.index'); + } + + if(auth()->user()->hasRole('admin')) { + return route('events.index'); + } + + if(auth()->user()->hasRole('subscriber') && auth()->user()->hasRole('presenter')) { + return route('home'); + } else if(auth()->user()->hasRole('presenter')) { + return route('presenter.events.index'); + } else { + return route('home'); + } + + } +} diff --git a/backup/app/Http/Controllers/Auth/RegisterController.php b/backup/app/Http/Controllers/Auth/RegisterController.php new file mode 100644 index 0000000..0a35801 --- /dev/null +++ b/backup/app/Http/Controllers/Auth/RegisterController.php @@ -0,0 +1,170 @@ +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', 'string', 'max:255'], + 'last_name' => ['required', 'string', 'max:255'], + 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], + 'password' => ['required', 'string', 'min:8', 'confirmed'], + ], [ + 'email.unique' => 'There is an account associated with this email address. Click Here to sign in.
After Sign in, you will get the option to become a subscriber.' + ]); + } + + /** + * Create a new user instance after a valid registration. + * + * @param array $data + * @return \App\User + */ + protected function create(array $data) + { + + return User::create([ + 'name' => $data['name'], + 'last_name' => $data['last_name'], + 'email' => $data['email'], + 'password' => Hash::make($data['password']), + ]); + } + + // Register + public function showRegistrationForm() + { + $pageConfigs = ['blankPage' => true]; + + return view('/auth/register', [ + 'pageConfigs' => $pageConfigs + ]); + } + + public function showRegistrationFormPresenter() + { + $pageConfigs = ['blankPage' => true]; + + return view('/auth/become-a-presenter', [ + 'pageConfigs' => $pageConfigs + ]); + } + + /** + * Handle a registration request for the application. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\RedirectResponse|\Illuminate\Http\JsonResponse + */ + public function registerPresenter(Request $request) + { + $request->validate([ + 'name' => ['required', 'string', 'max:255'], + 'last_name' => ['required', 'string', 'max:255'], + 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], + 'password' => ['required', 'string', 'min:8'], + 'institution_name' => 'required|string|max:255', + 'department' => 'required|string|max:255', + 'about_presentation' => 'required|string', + ], [ + 'email.unique' => 'There is an account associated with this email address. Click Here to sign in.' + ]); + + $user = new User; + $user->name = $request->name; + $user->last_name = $request->last_name; + $user->email = $request->email; + $user->password = Hash::make($request->password); + $user->save(); + + event(new Registered($user)); + + $user->updateOrCreateMeta("institution_name", $request->institution_name); + $user->updateOrCreateMeta("department", $request->department); + $user->updateOrCreateMeta("about_presentation", $request->about_presentation); + $user->updateOrCreateMeta("presentation_keywords", json_encode($request->presentation_keywords ?? [])); + + if($request->has('is_published')) { + $user->updateOrCreateMeta("presentation_published_info", $request->presentation_published_info ?? ""); + } + + // Address + $user->updateOrCreateAddress("institution_address", [ + "street_name" => $request->street_name, + "city" => $request->city, + "state" => $request->state, + "postal_code" => $request->postal_code, + "country" => $request->country, + ]); + + $user->syncRoles(['presenter']); + + $this->guard()->login($user); + + return redirect(route('home')); + + // return $request->wantsJson() + // ? new JsonResponse([], 201) + // : redirect($this->redirectPath()); + } + + /** + * The user has been registered. + * + * @param \Illuminate\Http\Request $request + * @param mixed $user + * @return mixed + */ + protected function registered(Request $request, $user) + { + $user->syncRoles(['subscriber']); + + } +} diff --git a/backup/app/Http/Controllers/Auth/ResetPasswordController.php b/backup/app/Http/Controllers/Auth/ResetPasswordController.php new file mode 100644 index 0000000..57992e5 --- /dev/null +++ b/backup/app/Http/Controllers/Auth/ResetPasswordController.php @@ -0,0 +1,52 @@ +middleware('guest'); + } + + public function showResetForm(Request $request, $token = null) + { + $pageConfigs = [ + 'bodyClass' => "bg-full-screen-image", + 'blankPage' => true + ]; + return view('auth.passwords.reset')->with( + ['token' => $token, 'email' => $request->email, 'pageConfigs' => $pageConfigs] + ); + } +} diff --git a/backup/app/Http/Controllers/Auth/VerificationController.php b/backup/app/Http/Controllers/Auth/VerificationController.php new file mode 100644 index 0000000..aea9617 --- /dev/null +++ b/backup/app/Http/Controllers/Auth/VerificationController.php @@ -0,0 +1,68 @@ +middleware('auth'); + $this->middleware('signed')->only('verify'); + $this->middleware('throttle:6,1')->only('verify', 'resend'); + } + + /** + * Show the email verification notice. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\RedirectResponse|\Illuminate\View\View + */ + public function show(Request $request) + { + $pageConfigs = [ + 'bodyClass' => "bg-full-screen-image", + 'blankPage' => true + ]; + return $request->user()->hasVerifiedEmail() + ? redirect($this->redirectPath()) + : view('auth.verify', compact('pageConfigs')); + } + + public function redirectTo() + { + if(auth()->user()->hasRole('subscriber') && !auth()->user()->subscribed('default')) { + return '/setup'; + } else { + return $this->redirectTo; + } + } +} diff --git a/backup/app/Http/Controllers/AuthController.php b/backup/app/Http/Controllers/AuthController.php new file mode 100644 index 0000000..26c5509 --- /dev/null +++ b/backup/app/Http/Controllers/AuthController.php @@ -0,0 +1,104 @@ +validate([ + 'name' => 'required|string', + 'email' => 'required|string|email|unique:users', + 'password' => 'required|string|', + 'c_password' => 'required|same:password', + ]); + + $user = new User([ + 'name' => $request->name, + 'email' => $request->email, + 'password' => bcrypt($request->password) + ]); + if ($user->save()) { + return response()->json([ + 'message' => 'Successfully created user!' + ], 201); + } else { + return response()->json(['error' => 'Provide proper details']); + } + } + + /** + * Login user and create token + * + * @param [string] email + * @param [string] password + * @param [boolean] remember_me + * @return [string] access_token + * @return [string] token_type + * @return [string] expires_at + */ + public function login(Request $request) + { + $request->validate([ + 'email' => 'required|string|email', + 'password' => 'required|string', + 'remember_me' => 'boolean' + ]); + $credentials = request(['email', 'password']); + if (!Auth::attempt($credentials)) + return response()->json([ + 'message' => 'Unauthorized' + ], 401); + $user = $request->user(); + $tokenResult = $user->createToken('Personal Access Token'); + $token = $tokenResult->token; + if ($request->remember_me) + $token->expires_at = Carbon::now()->addWeeks(1); + $token->save(); + return response()->json([ + 'access_token' => $tokenResult->accessToken, + 'token_type' => 'Bearer', + 'expires_at' => Carbon::parse( + $tokenResult->token->expires_at + )->toDateTimeString() + ]); + } + + /** + * Logout user (Revoke the token) + * + * @return [string] message + */ + public function logout(Request $request) + { + $request->user()->token()->revoke(); + return response()->json([ + 'message' => 'Successfully logged out' + ]); + } + + /** + * Get the authenticated User + * + * @return [json] user object + */ + public function user(Request $request) + { + return response()->json($request->user()); + } +} diff --git a/backup/app/Http/Controllers/AuthenticationController.php b/backup/app/Http/Controllers/AuthenticationController.php new file mode 100644 index 0000000..76236c5 --- /dev/null +++ b/backup/app/Http/Controllers/AuthenticationController.php @@ -0,0 +1,72 @@ + true]; + + return view('/content/authentication/auth-login-v1', ['pageConfigs' => $pageConfigs]); + } + + // Login v2 + public function login_v2() + { + $pageConfigs = ['blankPage' => true]; + + return view('/content/authentication/auth-login-v2', ['pageConfigs' => $pageConfigs]); + } + + // Register v1 + public function register_v1() + { + $pageConfigs = ['blankPage' => true]; + + return view('/content/authentication/auth-register-v1', ['pageConfigs' => $pageConfigs]); + } + + // Register v2 + public function register_v2() + { + $pageConfigs = ['blankPage' => true]; + + return view('/content/authentication/auth-register-v2', ['pageConfigs' => $pageConfigs]); + } + + // Forgot Password v1 + public function forgot_password_v1() + { + $pageConfigs = ['blankPage' => true]; + + return view('/content/authentication/auth-forgot-password-v1', ['pageConfigs' => $pageConfigs]); + } + + // Forgot Password v2 + public function forgot_password_v2() + { + $pageConfigs = ['blankPage' => true]; + + return view('/content/authentication/auth-forgot-password-v2', ['pageConfigs' => $pageConfigs]); + } + + // Reset Password + public function reset_password_v1() + { + $pageConfigs = ['blankPage' => true]; + + return view('/content/authentication/auth-reset-password-v1', ['pageConfigs' => $pageConfigs]); + } + + // Reset Password + public function reset_password_v2() + { + $pageConfigs = ['blankPage' => true]; + + return view('/content/authentication/auth-reset-password-v2', ['pageConfigs' => $pageConfigs]); + } +} diff --git a/backup/app/Http/Controllers/CardsController.php b/backup/app/Http/Controllers/CardsController.php new file mode 100644 index 0000000..4df085e --- /dev/null +++ b/backup/app/Http/Controllers/CardsController.php @@ -0,0 +1,63 @@ + "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Card"], ['name' => "Basic Card"] + ]; + return view('/content/cards/card-basic', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Card Advance + public function card_advance() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Card"], ['name' => "Advance Card"] + ]; + return view('/content/cards/card-advance', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Card Statistics + public function card_statistics() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Card"], ['name' => "Statistics Cards"] + ]; + return view('/content/cards/card-statistics', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Card Analytics + public function card_analytics() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Card"], ['name' => "Analytics Cards"] + ]; + return view('/content/cards/card-analytics', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Card Actions + public function card_actions() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Card"], ['name' => "Card Actions"] + ]; + return view('/content/cards/card-actions', [ + 'breadcrumbs' => $breadcrumbs + ]); + } +} diff --git a/backup/app/Http/Controllers/ChartsController.php b/backup/app/Http/Controllers/ChartsController.php new file mode 100644 index 0000000..b018819 --- /dev/null +++ b/backup/app/Http/Controllers/ChartsController.php @@ -0,0 +1,41 @@ + "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Charts & Maps"], ['name' => "Apex"] + ]; + return view('/content/charts-maps/chart-apex', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Chartjs Charts + public function chartjs() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Charts & Maps"], ['name' => "Chartjs"] + ]; + return view('/content/charts-maps/chart-chartjs', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Google Maps + public function maps_leaflet() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Maps"], ['name' => "Leaflet Maps"] + ]; + return view('/content/charts-maps/maps-leaflet', [ + 'breadcrumbs' => $breadcrumbs + ]); + } +} diff --git a/backup/app/Http/Controllers/ComponentsController.php b/backup/app/Http/Controllers/ComponentsController.php new file mode 100644 index 0000000..0e7ddcc --- /dev/null +++ b/backup/app/Http/Controllers/ComponentsController.php @@ -0,0 +1,262 @@ + "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Alerts"] + ]; + return view('/content/components/component-alert', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component - Avatar + public function avatar() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Avatar"] + ]; + return view('/content/components/component-avatar', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Badges + public function badges() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Badges"] + ]; + return view('/content/components/component-badges', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Breadcrumbs + public function breadcrumbs() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Breadcrumbs"] + ]; + return view('/content/components/component-breadcrumbs', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Buttons + public function buttons() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Buttons"] + ]; + return view('/content/components/component-buttons', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Carousel + public function carousel() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Carousel"] + ]; + return view('/content/components/component-carousel', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Collapse + public function collapse() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Collapse"] + ]; + return view('/content/components/component-collapse', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component - Divider + public function divider() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Divider"] + ]; + return view('/content/components/component-divider', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Dropdowns + public function dropdowns() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Dropdowns"] + ]; + return view('/content/components/component-dropdowns', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component List Group + public function list_group() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "List Group"] + ]; + return view('/content/components/component-list-group', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Media Objects + public function media_objects() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Media Objects"] + ]; + return view('/content/components/component-media-objects', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Modals + public function modals() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Modals"] + ]; + return view('/content/components/component-modals', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Navs + public function navs() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Navs"] + ]; + return view('/content/components/component-navs', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Pagination + public function pagination() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Pagination"] + ]; + return view('/content/components/component-pagination', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Pill Badges + public function pill_badges() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Pill Badges"] + ]; + return view('/content/components/component-pill-badges', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Pills + public function pills() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Pills"] + ]; + return view('/content/components/component-pills', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Tabs + public function tabs() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Tabs"] + ]; + return view('/content/components/component-tabs', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + + // Component Tooltips + public function tooltips() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Tooltips"] + ]; + return view('/content/components/component-tooltips', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Popovers + public function popovers() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Popovers"] + ]; + return view('/content/components/component-popovers', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Progress + public function progress() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Progress"] + ]; + return view('/content/components/component-progress', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Spinner + public function spinner() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Spinner"] + ]; + return view('/content/components/component-spinner', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Timeline + public function timeline() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Timeline"] + ]; + return view('/content/components/component-timeline', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Toast + public function toast() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Toast"] + ]; + return view('/content/components/component-toast', [ + 'breadcrumbs' => $breadcrumbs + ]); + } +} diff --git a/backup/app/Http/Controllers/Controller.php b/backup/app/Http/Controllers/Controller.php new file mode 100644 index 0000000..77ec359 --- /dev/null +++ b/backup/app/Http/Controllers/Controller.php @@ -0,0 +1,12 @@ +get('cp_img_path') != NULL ) { + $image = public_path("uploads/profile_pic/{$guard}/" . request()->get('cp_img_path'));// $_POST['cp_img_path'] = /assets/uploads/img_name.ext + $imgr->load($image); + + $imgX = intval($_POST['ic_x']); + $imgY = intval($_POST['ic_y']); + $imgW = intval($_POST['ic_w']); + $imgH = intval($_POST['ic_h']); + + $imgr->resize($imgW,$imgH,$imgX,$imgY); + + $imgr->save($image); + $record = auth($guard)->user(); + $record->profile_photo_path = request()->get('cp_img_path'); + $record->save(); + + echo 'get('cp_img_path') ) .'?t='.time().'" class="rounded mr-50" alt="profile image" height="80" + width="80"/>'; + } + + + } + + function uploadImage(Request $request, $guard) + { + + $id = Auth::guard($guard)->user()->id; + $validator = Validator::make( + $request->all(), + ['file' => 'required|image|mimes:jpeg,png,jpg,png,ico|max:2048'], + [ + 'file.mimes' => 'Only jpg, jpeg, png files are allowed', + 'file.max' => 'Image size must be less than 2MB.' + ] + ); + + if ($validator->fails()) { + echo "
You have following errors:
"; + echo "
"; + foreach($validator->errors()->all() as $error) { + echo "

" . $error . "

"; + } + echo "
"; + exit; + return response()->json([ + 'success' => false, + 'error' => $validator->errors()->all() + ]); + } + + $fileName = "{$guard}_" . $id . "_" . time() . "." . $request->file('file')->getClientOriginalExtension(); + + + $request->file('file')->move(public_path('uploads/profile_pic/' . $guard), $fileName); + echo '
'; + exit; + + } +} + + +class imageResizing +{ + + var $image; + var $image_type; + var $res; + + function load($filename) + { + + $image_info = getimagesize($filename); + + $this->image_type = $image_info[2]; + + if ($this->image_type == IMAGETYPE_JPEG) { + $this->image = imagecreatefromjpeg($filename); + $this->res = ".jpg"; + } elseif ($this->image_type == IMAGETYPE_GIF) { + $this->image = imagecreatefromgif($filename); + $this->res = ".gif"; + } elseif ($this->image_type == IMAGETYPE_PNG) { + $this->image = imagecreatefrompng($filename); + $this->res = ".png"; + } + } + + function save($filename, $image_type = IMAGETYPE_JPEG, $compression = 100, $permissions = null) + { + + if ($image_type == IMAGETYPE_JPEG) + imagejpeg($this->image, $filename, $compression); + + elseif ($image_type == IMAGETYPE_GIF) + imagegif($this->image, $filename); + + elseif ($image_type == IMAGETYPE_PNG) + imagepng($this->image, $filename); + + if ($permissions != null) + chmod($filename, $permissions); + } + + function output($image_type = IMAGETYPE_JPEG) + { + + if ($image_type == IMAGETYPE_JPEG) + imagejpeg($this->image); + + elseif ($image_type == IMAGETYPE_GIF) + imagegif($this->image); + + elseif ($image_type == IMAGETYPE_PNG) + imagepng($this->image); + } + + function getWidth() + { + return imagesx($this->image); + } + + function getHeight() + { + return imagesy($this->image); + } + + function resizeToHeight($height) + { + + $ratio = $height / $this->getHeight(); + + $width = $this->getWidth() * $ratio; + + $this->resize($width, $height); + } + function resizeToWidth($width) + { + + $ratio = $width / $this->getWidth(); + + $height = $this->getheight() * $ratio; + + $this->resize($width, $height); + } + function scale($scale) + { + + $width = $this->getWidth() * $scale / 100; + + $height = $this->getheight() * $scale / 100; + + $this->resize($width, $height); + } + function resize($width, $height, $x = 0, $y = 0) + { + + $new_image = imagecreatetruecolor($width, $height); + + //imagecopyresampled($new_image, $this->image, $x, $y, 0, 0, $width, $height, $this->getWidth(), $this->getHeight()); + imagecopy($new_image, $this->image, 0, 0, $x, $y, $width, $height); + /* + echo $x."
"; + echo $y."
"; + echo $width."
"; + echo $height."
"; + echo $this->getWidth()."
"; + echo $this->getHeight();*/ + + $this->image = $new_image; + } +} diff --git a/backup/app/Http/Controllers/DashboardController.php b/backup/app/Http/Controllers/DashboardController.php new file mode 100644 index 0000000..e0f258f --- /dev/null +++ b/backup/app/Http/Controllers/DashboardController.php @@ -0,0 +1,85 @@ + false]; + + $stats['admins_count'] = User::role('admin')->count(); + $stats['presenters_count'] = User::role('presenter')->count(); + $stats['subscribers_count'] = User::role('subscriber')->count(); + $stats['events_count'] = Event::count(); + $stats['videos_count'] = Video::count(); + + return view('/content/dashboard/super_admin', ['pageConfigs' => $pageConfigs, 'stats' => $stats]); + } + + public function admin() + { + $pageConfigs = ['pageHeader' => false]; + + $stats['admins_count'] = User::role('admin')->count(); + $stats['presenters_count'] = User::role('presenter')->count(); + $stats['subscribers_count'] = User::role('subscriber')->count(); + $stats['events_count'] = Event::count(); + $stats['videos_count'] = Video::count(); + + return view('/content/dashboard/admin', ['pageConfigs' => $pageConfigs, 'stats' => $stats]); + } + + public function presenter() + { + + } + + + public function index() + { + $pageConfigs = [ + 'pageHeader' => false, + 'showMenu' => false, + 'mainLayoutType' => 'subscriber' + ]; + + if ( + ( auth()->user()->hasRole('presenter') && auth()->user()->hasRole('subscriber') ) + || + auth()->user()->hasRole('subscriber') + || + auth()->user()->hasRole('super_admin') + || + auth()->user()->hasRole('admin') + ) { + + $events = Event::where('status', 'publish') + ->orderBy('start_date_time', 'asc') + // ->where('start_date_time', '>=', date('Y-m-d H:i:s')) + ->limit(6)->get(); + + $videos = Video::where('status', 'publish') + ->limit(8)->get(); + + return view('/content/dashboard/subscriber', [ + 'pageConfigs' => $pageConfigs, 'mainLayoutType' => 'subscriber', + 'events' => $events, + 'videos' => $videos + ]); + } else if (auth()->user()->hasRole('presenter')) { + + return redirect(route('presenter.events.index')); + + } else { + + abort(403, "Access Denied"); + + } + } +} diff --git a/backup/app/Http/Controllers/EventController.php b/backup/app/Http/Controllers/EventController.php new file mode 100644 index 0000000..b400aff --- /dev/null +++ b/backup/app/Http/Controllers/EventController.php @@ -0,0 +1,445 @@ +where('is_active', 1)->get()); + View::share('presenters', User::role(Helper::PRESENTER_ROLE)->where('profile_status', 'approved')->where('is_active', 1)->get()); + View::share('keywords', Keyword::all()); + } + + /** + * Display a listing of the resource. + * + * @return \Illuminate\Http\Response + */ + public function index() + { + + if (request()->ajax()) { + + if (auth()->user()->hasRole('super_admin')) { + $events = Event::with('user')->where('events.id', '<>', 0); + if (request()->get('view') == 'trash') { + $events->onlyTrashed(); + } + } else { + + if (request()->get('view') == 'trash') { + $events = Event::onlyTrashed()->leftJoin('event_user', 'event_user.event_id', '=', 'events.id') + ->where(function($query) { + $query->where('event_user.user_id', auth()->user()->id); + $query->orWhere('events.user_id', auth()->user()->id); + }); + + } else { + $events = Event::leftJoin('event_user', 'event_user.event_id', '=', 'events.id') + ->where(function($query) { + $query->where('event_user.user_id', auth()->user()->id); + $query->orWhere('events.user_id', auth()->user()->id); + }); + // ->where('event_user.user_id', auth()->user()->id) + // ->orWhere('events.user_id', auth()->user()->id); + } + + } + + + + if (request()->get('event_admin') != "") { + $events->where('user_id', request()->get('event_admin')); + } + + if (request()->get('event_status') != "") { + $events->where('status', request()->get('event_status')); + } + + + if (request()->get('view') == 'calendar') { + // Return data for Calendar + if (auth()->user()->hasRole('super_admin')) { + return Event::where('id', '<>', 0)->select('events.*', 'start_date_time as start')->get()->toJson(); + } else { + return Event::leftJoin('event_user', 'event_user.event_id', '=', 'events.id') + ->where('event_user.user_id', auth()->user()->id) + ->orWhere('events.user_id', auth()->user()->id) + ->select('events.*', 'events.start_date_time as start') + ->get()->toJson(); + } + } + + return datatables()->of($events) + ->editColumn('title', function ($event) { + $title = Helper::tooltip($event->title, 50); + $eventLink = route('subscriber.events.show', $event->id); + return "$title "; + }) + ->editColumn('created_at', function ($event) { + return Timezone::convertToLocal($event->created_at, 'd M Y'); + }) + ->editColumn('status', function ($event) { + return $event->statusHtml(); + }) + ->editColumn('start_date_time', function ($event) { + return Timezone::convertToLocal($event->start_date_time, 'd M Y h:i A'); + }) + ->addColumn('users', function ($event) { + if (isset($event->user->id)) { + if (auth()->user()->id == $event->user->id) { + return "Me"; + } else { + $user = $event->user; + return $event->user->fullName() . "
" . "{$user->email}"; + } + } else { + return "N/A"; + } + }) + ->addColumn('last_name', function($event) { + if(!isset($event->user->id)) { return "N/A"; } + return $event->user->last_name; + }) + ->addColumn('email', function($event) { + if(!isset($event->user->id)) { return "N/A"; } + return $event->user->email; + }) + ->addColumn('action', function ($event) { + $deleteUrl = route('events.destroy', $event->id); + + if ($event->trashed()) { + $url = route('events.restore', $event->id); + + return " + + + + + + "; + } else { + $url = route('events.edit', $event->id); + $liveUrl = route('live.event.index', $event->id); + + return " + + + + + Go Live + "; + } + }) + ->rawColumns(['action', 'is_active', 'users', 'status', 'title']) + ->make(true); + } else { + + $pageConfigs = ['pageHeader' => true]; + $breadcrumbs = [ + ['link' => "/", 'name' => "Dashboard"], + ['name' => "Events"] + ]; + return view('/content/events/manage/index', compact('breadcrumbs')); + } + } + + /** + * Show the form for creating a new resource. + * + * @return \Illuminate\Http\Response + */ + public function create() + { + return view('/content/events/manage/create'); + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function store(Request $request) + { + $request->validate($this->validationRules()); + + $event = new Event; + $event->user_id = auth()->user()->hasRole('super_admin') ? $request->user_id : auth()->user()->id; + $event->title = $request->title; + $event->start_date_time = Timezone::convertFromLocal($request->start_date_time); + $channelName = Str::slug($request->title, '-'); + $channelName = Str::limit($channelName, 10) . '_' . date('d_M_Y_H_i_s'); + $event->channel_name = $channelName; + $event->status = $request->status; + $event->save(); + + $event->users()->sync($request->users ?? []); + + $keywordIds = []; + + foreach($request->keywords as $keywordId) { + if(!is_numeric($keywordId)) { + $keyword = Keyword::create([ + 'keyword_name' => $keywordId, + ]); + $keywordId = $keyword->id; + } + + $keywordIds[] = $keywordId; + } + + $event->keywords()->sync($keywordIds ?? []); + + if ($request->hasFile('logo')) { + try { + $path = $request->file('logo')->store('public/event_images'); + $fileName = $request->file('logo')->getClientOriginalName(); + $extension = $request->file('logo')->extension(); + $file = new File; + $file->title = $fileName; + $file->location = $path; + $file->extension = $extension; + $file->save(); + + $event->logo_id = $file->id; + $event->save(); + } catch (\Exception $e) {} + } + + foreach($event->users ?? [] as $user) { + $user = User::find($user->id); + + try { + $user->notifyAt( + new PresenterEventReminder($event, $user), + Carbon::parse(Timezone::convertFromLocal($event->start_date_time)) + ); + } catch(\Exception $e) { + // Send date may be in advance. + } + + } + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Event created successfully.' + ]); + } + + /** + * Display the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function show($id) + { + $record = Event::findOrFail($id); + $record->start_date_time = Timezone::convertToLocal($record->start_date_time, 'd M Y h:i A'); + $record->token = $record->generateToken(); + return view('/content/events/manage/show', compact('record')); + } + + /** + * Show the form for editing the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function edit($id) + { + $record = Event::findOrFail($id); + $record->start_date_time = Timezone::convertToLocal($record->start_date_time, 'd M Y h:i A'); + return view('/content/events/manage/edit', compact('record')); + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param int $id + * @return \Illuminate\Http\Response + */ + public function update(Request $request, $id) + { + $event = Event::findOrFail($id); + $request->validate($this->validationRules([ + 'title' => 'required|max:255|unique:events,title,' . $id, + ])); + + $event->user_id = auth()->user()->hasRole('super_admin') ? $request->user_id : auth()->user()->id; + $event->title = $request->title; + $event->start_date_time = Timezone::convertFromLocal($request->start_date_time); + $event->status = $request->status; + $event->save(); + + + $keywordIds = []; + + foreach($request->keywords as $keywordId) { + if(!is_numeric($keywordId)) { + $keyword = Keyword::create([ + 'keyword_name' => $keywordId, + ]); + $keywordId = $keyword->id; + } + + $keywordIds[] = $keywordId; + } + + $event->keywords()->sync($keywordIds ?? []); + + if ($request->hasFile('logo')) { + $event->addOrUpdateLogo($request->file('logo')); + } + + foreach($event->users ?? [] as $user) { + $user = User::find($user->id); + + $record = ScheduledNotification::where( + 'notification', + Serializer::create()->serializeNotifiable(new PresenterEventReminder($event, $user)) + )->where([ + 'target_id' => $user->id, + 'target_type' => 'App\User' + ])->first(); + + if($record) { + $record->delete(); + } + } + + $event->users()->sync($request->users ?? []); + + foreach($event->users ?? [] as $user) { + $user = User::find($user->id); + + try { + $user->notifyAt( + new PresenterEventReminder($event, $user), + Carbon::parse(Timezone::convertFromLocal($event->start_date_time)) + ); + } catch(\Exception $e) { + // Send date may be in advance. + } + } + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Event information updated successfully.' + ]); + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function destroy($id) + { + $record = Event::withTrashed()->findOrFail($id); + if ($record->trashed()) { + if ($record->logo_id) { + $logo = File::find($record->logo_id); + $logoLocation = $logo->location; + } else { + $logoLocation = ""; + } + + $record->forceDelete(); + + if (!empty($logoLocation)) { + // Storage::delete($logoLocation); + $logo->delete(); + } + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Event permanently deleted successfully.' + ]); + } else { + $record->delete(); + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Event moved to trash successfully.' + ]); + } + } + + public function restore($id) + { + $record = Event::withTrashed()->findOrFail($id); + if ($record->trashed()) { + $record->restore(); + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Event restored successfully.' + ]); + } else { + return response()->json([ + 'message' => 'Not found' + ], 404); + } + } + + public function validationRules($overrideRule = []) + { + $rules = [ + 'title' => 'required|max:255|unique:events,title', + 'start_date_time' => 'required', + 'status' => 'required|in:' . implode(',', array_keys(config('setting.event_status'))), + 'logo' => 'image|nullable|max:5120' + ]; + return array_merge($rules, $overrideRule); + } +} diff --git a/backup/app/Http/Controllers/EventRecordingController.php b/backup/app/Http/Controllers/EventRecordingController.php new file mode 100644 index 0000000..9a88c8d --- /dev/null +++ b/backup/app/Http/Controllers/EventRecordingController.php @@ -0,0 +1,85 @@ + "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Extensions"], ['name' => "Sweet Alerts"] + ]; + return view('/content/extensions/ext-component-sweet-alerts', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // block ui + public function block_ui() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Extensions"], ['name' => "BlockUI"] + ]; + return view('/content/extensions/ext-component-block-ui', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Toastr + public function toastr() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Extensions"], ['name' => "Toastr"] + ]; + return view('/content/extensions/ext-component-toastr', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // NoUi Slider + public function slider() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Extensions"], ['name' => "Sliders"] + ]; + return view('/content/extensions/ext-component-slider', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Drag Drop + public function drag_drop() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Extensions"], ['name' => "Drag & Drop"] + ]; + return view('/content/extensions/ext-component-drag-drop', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Tour + public function tour() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Extensions"], ['name' => "Tour"] + ]; + return view('/content/extensions/ext-component-tour', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Clipboard + public function clipboard() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Extensions"], ['name' => "Clipboard"] + ]; + return view('/content/extensions/ext-component-clipboard', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Media Player + public function plyr() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Extensions"], ['name' => "Media Player"] + ]; + return view('/content/extensions/ext-component-media-player', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Context Menu + public function context_menu() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Extensions"], ['name' => "Context Menu"] + ]; + return view('/content/extensions/ext-component-context-menu', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // swiper + public function swiper() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Extensions"], ['name' => "Swiper"] + ]; + return view('/content/extensions/ext-component-swiper', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // tree + public function tree() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Extensions"], ['name' => "Tree"] + ]; + return view('/content/extensions/ext-component-tree', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // ratings + public function ratings() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Extensions"], ['name' => "Ratings"] + ]; + return view('/content/extensions/ext-component-ratings', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // I18n + public function locale() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Extensions"], ['name' => "Locale"] + ]; + return view('/content/locale/locale', [ + 'breadcrumbs' => $breadcrumbs + ]); + } +} diff --git a/backup/app/Http/Controllers/FormsController.php b/backup/app/Http/Controllers/FormsController.php new file mode 100644 index 0000000..b7ac41a --- /dev/null +++ b/backup/app/Http/Controllers/FormsController.php @@ -0,0 +1,185 @@ + "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Form Elements"], ['name' => "Input"] + ]; + return view('/content/forms/form-elements/form-input', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Form Elements - Input-groups + public function input_groups() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Form Elements"], ['name' => "Input Groups"] + ]; + return view('/content/forms/form-elements/form-input-groups', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Form Elements - Input-mask + public function input_mask() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Form Elements"], ['name' => "Input Mask"] + ]; + return view('/content/forms/form-elements/form-input-mask', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Form Elements - Textarea + public function textarea() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Form Elements"], ['name' => "Textarea"] + ]; + return view('/content/forms/form-elements/form-textarea', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Form Elements - Checkbox + public function checkbox() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Form Elements"], ['name' => "Checkbox"] + ]; + return view('/content/forms/form-elements/form-checkbox', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Form Elements - Radio + public function radio() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Form Elements"], ['name' => "Radio"] + ]; + return view('/content/forms/form-elements/form-radio', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Form Elements - Switch + public function switch() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Form Elements"], ['name' => "Switch"] + ]; + return view('/content/forms/form-elements/form-switch', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Form Elements - Select + public function select() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Form Elements"], ['name' => "Select"] + ]; + return view('/content/forms/form-elements/form-select', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + + + // Form Elements - Number Input + public function number_input() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Form Elements"], ['name' => "Number Input"] + ]; + return view('/content/forms/form-elements/form-number-input', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // File Uploader + public function file_uploader() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Form Elements"], ['name' => "File Uploader"] + ]; + return view('/content/forms/form-elements/form-file-uploader', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Quill Editor + public function quill_editor() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Form Elements"], ['name' => "Quill Editor"] + ]; + return view('/content/forms/form-elements/form-quill-editor', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Form Elements - Date & time Picker + public function date_time_picker() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Form Elements"], ['name' => "Date & Time Picker"] + ]; + return view('/content/forms/form-elements/form-date-time-picker', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Form Layouts + public function layouts() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Forms"], ['name' => "Form Layouts"] + ]; + return view('/content/forms/form-layout', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Form Wizard + public function wizard() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Forms"], ['name' => "Form Wizard"] + ]; + return view('/content/forms/form-wizard', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Form Validation + public function validation() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Forms"], ['name' => "Form Validation"] + ]; + return view('/content/forms/form-validation', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + // Form repeater + public function form_repeater() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Forms"], ['name' => "Form Repeater"] + ]; + return view('/content/forms/form-repeater', [ + 'breadcrumbs' => $breadcrumbs + ]); + } +} diff --git a/backup/app/Http/Controllers/HouseController.php b/backup/app/Http/Controllers/HouseController.php new file mode 100644 index 0000000..0b74ca6 --- /dev/null +++ b/backup/app/Http/Controllers/HouseController.php @@ -0,0 +1,77 @@ +id)->where('isOwner',true)->pluck('user_id'); + + $owner= User::find($owner)->first(); + + $tenant= Resident::where('house_id',$house->id)->where('isOwner',false)->pluck('user_id'); + + $tenants= User::find($tenant); + + $payments= Payment::where('house_id',$house->id)->get(); + + $next = House::where('id','>',$house->id)->orderby('id','asc')->first(); + + $previous = House::where('id','<',$house->id)->orderby('id','desc')->first(); + + $maxCount = House::orderby('id','desc')->first()->id; + + return view('houses.detail', compact('owner','tenants', 'payments', 'house', 'next', 'previous', 'maxCount')); + } + + + public function edit(string $id) + { + // + } + + + public function update(Request $request, string $id) + { + // + } + + + public function destroy(string $id) + { + // + } +} diff --git a/backup/app/Http/Controllers/KeywordController.php b/backup/app/Http/Controllers/KeywordController.php new file mode 100644 index 0000000..77dd903 --- /dev/null +++ b/backup/app/Http/Controllers/KeywordController.php @@ -0,0 +1,84 @@ +'en', 'fr'=>'fr','de'=>'de','pt'=>'pt']; + // check for existing language + if(array_key_exists($locale,$availLocale)){ + session()->put('locale',$locale); + } + return redirect()->back(); + } +} diff --git a/backup/app/Http/Controllers/LiveEventController.php b/backup/app/Http/Controllers/LiveEventController.php new file mode 100644 index 0000000..178b0c6 --- /dev/null +++ b/backup/app/Http/Controllers/LiveEventController.php @@ -0,0 +1,33 @@ + 'boxed', + 'pageHeader' => false, + 'showMenu' => false, + 'verticalMenuNavbarType' => 'hidden', + 'pageClass' => 'chat-application', + 'footerType' => 'hidden' + // 'contentLayout' => "content-left-sidebar", + ]; + + if(auth()->user()->hasRole('presenter')) [ + $pageConfigs['mainLayoutType'] = 'subscriber' + ]; + + $event->token = $event->generateToken(); + return view('content/live/index', compact('event', 'pageConfigs')); + } +} diff --git a/backup/app/Http/Controllers/LoginController.php b/backup/app/Http/Controllers/LoginController.php new file mode 100644 index 0000000..2e1e6df --- /dev/null +++ b/backup/app/Http/Controllers/LoginController.php @@ -0,0 +1,31 @@ +only('mobile1', 'password'); + + if (Auth::attempt($credentials)) + { + return redirect('/'); + } + return redirect('/')->with('error','Incorrect Password' ); + } + + public function logout(Request $request) + { + + $request->session()->put('logged_out', true); + + Auth::logout(); + + return redirect('/'); + } +} diff --git a/backup/app/Http/Controllers/MiscellaneousController.php b/backup/app/Http/Controllers/MiscellaneousController.php new file mode 100644 index 0000000..2244c64 --- /dev/null +++ b/backup/app/Http/Controllers/MiscellaneousController.php @@ -0,0 +1,42 @@ + true]; + + return view('/content/miscellaneous/page-coming-soon', ['pageConfigs' => $pageConfigs]); + } + + // Error + public function error() + { + $pageConfigs = ['blankPage' => true]; + + return view('/content/miscellaneous/error', ['pageConfigs' => $pageConfigs]); + } + + // Not-authorized + public function not_authorized() + { + $pageConfigs = ['blankPage' => true]; + + return view('/content/miscellaneous/page-not-authorized', ['pageConfigs' => $pageConfigs]); + } + + // Maintenance + public function maintenance() + { + $pageConfigs = ['blankPage' => true]; + + return view('/content/miscellaneous/page-maintenance', [ + 'pageConfigs' => $pageConfigs + ]); + } +} diff --git a/backup/app/Http/Controllers/PageLayoutController.php b/backup/app/Http/Controllers/PageLayoutController.php new file mode 100644 index 0000000..3a18256 --- /dev/null +++ b/backup/app/Http/Controllers/PageLayoutController.php @@ -0,0 +1,45 @@ + true]; + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Layouts"], ['name' => "Collapsed menu"]]; + return view('/content/page-layouts/layout-collapsed-menu', ['pageConfigs' => $pageConfigs, 'breadcrumbs' => $breadcrumbs]); + } + + // Boxed Layout + public function layout_boxed() + { + $pageConfigs = ['layoutWidth' => 'boxed']; + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Layouts"], ['name' => "Layout Boxed"]]; + return view('/content/page-layouts/layout-boxed', ['pageConfigs' => $pageConfigs, 'breadcrumbs' => $breadcrumbs]); + } + // Layout Without Menu + public function layout_without_menu() + { + $pageConfigs = ['showMenu' => false]; + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Layouts"], ['name' => "Layout without menu"]]; + return view('/content/page-layouts/layout-without-menu', ['pageConfigs' => $pageConfigs, 'breadcrumbs' => $breadcrumbs]); + } + // Empty Layout + public function layout_empty() + { + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Layouts"], ['name' => "Layout Empty"]]; + return view('/content/page-layouts/layout-empty', ['breadcrumbs' => $breadcrumbs]); + } + // Blank Layout + public function layout_blank() + { + $pageConfigs = ['blankPage' => true]; + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Layouts"], ['name' => "Layout Blank"]]; + return view('/content/page-layouts/layout-blank', ['pageConfigs' => $pageConfigs, 'breadcrumbs' => $breadcrumbs]); + } +} diff --git a/backup/app/Http/Controllers/PagesController.php b/backup/app/Http/Controllers/PagesController.php new file mode 100644 index 0000000..3fb0948 --- /dev/null +++ b/backup/app/Http/Controllers/PagesController.php @@ -0,0 +1,88 @@ + "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Pages"], ['name' => "Account Settings"]]; + return view('/content/pages/page-account-settings', ['breadcrumbs' => $breadcrumbs]); + } + + // Profile + public function profile() + { + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Pages"], ['name' => "Profile"]]; + + return view('/content/pages/page-profile', ['breadcrumbs' => $breadcrumbs]); + } + + // FAQ + public function faq() + { + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Pages"], ['name' => "FAQ"]]; + return view('/content/pages/page-faq', ['breadcrumbs' => $breadcrumbs]); + } + + // Knowledge Base + public function knowledge_base() + { + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Pages"], ['name' => "Knowledge Base"]]; + return view('/content/pages/page-knowledge-base', ['breadcrumbs' => $breadcrumbs]); + } + + // Knowledge Base Category + public function kb_category() + { + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Pages"], ['link' => "/page/knowledge-base", 'name' => "Knowledge Base"], ['name' => "Category"]]; + return view('/content/pages/page-kb-category', ['breadcrumbs' => $breadcrumbs]); + } + + // Knowledge Base Question + public function kb_question() + { + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Pages"], ['link' => "/page/knowledge-base", 'name' => "Knowledge Base"], ['link' => "/page/kb-category", 'name' => "Category"], ['name' => "Question"]]; + return view('/content/pages/page-kb-question', ['breadcrumbs' => $breadcrumbs]); + } + + // pricing + public function pricing() + { + $pageConfigs = ['pageHeader' => false]; + return view('/content/pages/page-pricing', ['pageConfigs' => $pageConfigs]); + } + + // blog list + public function blog_list() + { + $pageConfigs = ['contentLayout' => 'content-detached-right-sidebar', 'bodyClass' => 'content-detached-right-sidebar']; + + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Pages"], ['link' => "javascript:void(0)", 'name' => "Blog"], ['name' => "List"]]; + + return view('/content/pages/page-blog-list', ['breadcrumbs' => $breadcrumbs, 'pageConfigs' => $pageConfigs]); + } + + // blog detail + public function blog_detail() + { + $pageConfigs = ['contentLayout' => 'content-detached-right-sidebar', 'bodyClass' => 'content-detached-right-sidebar']; + + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Pages"], ['link' => "javascript:void(0)", 'name' => "Blog"], ['name' => "Detail"]]; + + return view('/content/pages/page-blog-detail', ['breadcrumbs' => $breadcrumbs, 'pageConfigs' => $pageConfigs]); + } + + // blog edit + public function blog_edit() + { + + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Pages"], ['link' => "javascript:void(0)", 'name' => "Blog"], ['name' => "Edit"]]; + + return view('/content/pages/page-blog-edit', ['breadcrumbs' => $breadcrumbs]); + } +} diff --git a/backup/app/Http/Controllers/PaymentController.php b/backup/app/Http/Controllers/PaymentController.php new file mode 100644 index 0000000..ed04800 --- /dev/null +++ b/backup/app/Http/Controllers/PaymentController.php @@ -0,0 +1,300 @@ +pluck('id')->toarray(); + $payments = Payment::sortedData($payments)->get(); + $count = $payments->count(); + $sum = $payments->sum('amount'); + } + else { + return redirect()->route('payments.index')->with('error','Invalid Request'); + } + } + elseif(isset($_GET['start_date']) && isset($_GET['end_date'])) + { + $startdate = strtotime($_GET['start_date']); + $enddate = strtotime($_GET['end_date']); + + if ( $startdate == true && $enddate == true) { + $payments = Payment::Datebetween($_GET['start_date'], $_GET['end_date'])->pluck('id')->toarray(); + $payments = Payment::sortedData($payments)->get(); + $count = $payments->count(); + $sum = $payments->sum('amount'); + } else { + return redirect()->route('payments.index')->with('error','Invalid Request'); + } + } + elseif(isset($_GET['sort'])) + { + $payments= Payment::sort($_GET['sort']); + + $count = $payments->count(); + $sum = $payments->sum('amount'); + + } + elseif(isset($_GET['unpaid'])) + { + $month = $_GET['unpaid']; + + $payments = DB::table('houses') + ->selectRaw('houses.full_address') + ->where('houses.house_type', 'house') + ->whereNotIn('houses.id', function ($query) use ($month) { + $query->select('house_id') + ->from('payments') + ->distinct() + ->where('billingmonth', $month); + })->get(); + + $count = $payments->count(); + $sum = 0 ; + foreach ($payments as $payment) { + $array[] = House::where('full_address',$payment->full_address)->first(); + } + + $sum=0; + $payments= collect($array); + } + else + { + $payments = Payment::get()->pluck('id')->toarray(); + $payments = Payment::sortedData($payments)->get(); + $count = $payments->count(); + $sum = $payments->sum('amount'); + } + + return view('payments.index', compact('payments', 'months', 'count', 'sum', 'id')); + } + + + public function create() + { + $houses = House::with('residents')->where('house_type', 'house')->get(); + + $months = config('global.months'); + + $PaymentModes = PaymentMode::get(); + + return view('payments.create', compact('houses', 'months', 'PaymentModes')); + } + + + public function store(Request $req, Payment $payment) + { + $req->validate([ + 'house_id' =>'required', + 'billingmonth' => 'required', + 'payment_modes_id' =>'required', + 'dateofdeposit' => 'required', + 'comments' => 'nullable' + ]); + + if($req['billingmonth'][0] == 'init') + { + + $initialpayment = Payment::where('house_id', $req->house_id)->where('billingmonth','init')->first(); + + if($initialpayment == null) + { + $payment=Payment::create([ + + 'house_id' => $req['house_id'], + 'billingmonth' => $req['billingmonth'][0], + 'amount' => $this->initialpayment, + 'payment_modes_id' => $req->payment_modes_id, + 'dateofdeposit' => Carbon::parse($req->dateofdeposit)->format('d-m-Y'), + 'comments' => $req['comments'], + ]); + + Activitylog::create([ + 'user_id' => Auth::user()->id, + 'action' => 'Created', + 'module_id' => 1, + 'module_item_id' => $payment->id + ]); + + if($req['billingmonth']) + { + foreach($req['billingmonth'] as $month) + { + if(Payment::where('house_id', $req->house_id)->where('billingmonth',$month)->first() == null) + { + $payment=Payment::create([ + + 'house_id' => $req['house_id'], + 'billingmonth' => $month, + 'amount' => $this->monthlypayment, + 'payment_modes_id' => $req->payment_modes_id, + 'dateofdeposit' => Carbon::parse($req->dateofdeposit)->format('d-m-Y'), + 'comments' => $req['comments'] + ]); + Activitylog::create([ + 'user_id' => Auth::user()->id, + 'action' => 'Created', + 'module_id' => 1, + 'module_item_id' => $payment->id + ]); + } + } + } + return back()->with('success', 'Payment Added Successfully'); + } + } + else + { + foreach($req['billingmonth'] as $month) + { + if(Payment::where('house_id', $req->house_id)->where('billingmonth',$month)->first() == null) + { + $payment=Payment::create([ + 'house_id' => $req['house_id'], + 'billingmonth' => $month, + 'amount' => $this->monthlypayment, + 'payment_modes_id' => $req->payment_modes_id, + 'dateofdeposit' => Carbon::parse($req->dateofdeposit)->format('d-m-Y'), + 'comments' => $req['comments'] + ]); + Activitylog::create([ + 'user_id' => Auth::user()->id, + 'action' => 'Created', + 'module_id' => 1, + 'module_item_id' => $payment->id + ]); + } + } + return back()->with('success', 'Payment Added Successfully'); + } + } + + + public function show(Payment $payment) + { + // + } + + + public function edit(Payment $payment) + { + $houses = House::with('residents')->where('house_type', 'house')->get(); + + $months = config('global.months'); + + $PaymentModes = PaymentMode::get(); + + return view('payments.edit', compact('payment', 'houses', 'months', 'PaymentModes')); + } + + + public function update(Request $req, Payment $payment) + { + + $attributes= $req->validate([ + 'house_id' =>'required', + 'billingmonth' => 'required', + 'payment_modes_id' =>'required', + 'dateofdeposit' => 'required', + 'comments' => 'nullable' + ]); + + $exists = Payment::where('house_id',$attributes['house_id'])->where('billingmonth',$attributes['billingmonth'] )->first(); + + if($exists) + { + $payment->update([ + 'payment_modes_id' => $req['payment_modes_id'], + 'dateofdeposit' => Carbon::parse($req->dateofdeposit)->format('d-m-Y'), + 'comments' => $req['comments'] + ]); + + Activitylog::create([ + 'user_id' => Auth::user()->id, + 'action' => 'Updated', + 'module_id' => 1, + 'module_item_id' => $payment->id + ]); + + return redirect()->route('payments.index')->with('success', 'Payment Edited Succesfully'); + } + + $payment->update([ + 'house_id' => $req['house_id'], + 'billingmonth' => $req['billingmonth'], + 'payment_modes_id' => $req->payment_modes_id, + 'dateofdeposit' => Carbon::parse($req->dateofdeposit)->format('d-m-Y'), + 'comments' => $req['comments'] + ]); + + Activitylog::create([ + 'user_id' => Auth::user()->id, + 'action' => 'Updated', + 'module_id' => 1, + 'module_item_id' => $payment->id + ]); + + return redirect()->route('payments.index')->with('success', 'Payment Edited Succesfully'); + } + + public function destroy(Payment $payment) + { + abort_if(auth()->user()->usertype_id != User::ADMIN, 403, 'Access Deined'); + + Activitylog::create([ + 'user_id' => Auth::user()->id, + 'action' => 'Deleted', + 'module_id' => 1, + 'module_item_id' => $payment->id + ]); + + $payment->delete(); + + return back()->with('success','payment deleted successfully'); + } + + public function ajax(Request $request) + { + $houseId = $request->input('house_id'); + + $payments = Payment::where('house_id', $houseId) + ->with('paymentmode') + ->get() + ->map(function ($payment) { + return [ + 'name' => $payment->paymentmode->name, + 'billingmonth' => $payment->billingmonth, + 'dateofdeposit' => $payment->dateofdeposit + ]; + }); + + $payments = collect($payments)->toArray(); + + return response()->json([ + 'payments' => isset($payments[0]) ? $payments : null + ]); + } +} diff --git a/backup/app/Http/Controllers/PlaylistController.php b/backup/app/Http/Controllers/PlaylistController.php new file mode 100644 index 0000000..09dc8f9 --- /dev/null +++ b/backup/app/Http/Controllers/PlaylistController.php @@ -0,0 +1,160 @@ +validate([ + 'model_type' => "bail|required|in:event,video", + 'model_id' => "bail|required|numeric|exists:{$request->model_type}s,id", + 'type' => "bail|required|in:reminder" + ]); + + + $playlist = Playlist::where([ + 'model_type' => $request->model_type, + 'model_id' => $request->model_id, + 'user_id' => auth()->user()->id, + 'playlist_type' => $request->type + ])->first(); + + if($playlist) { + $playlist->delete(); + + if($request->model_type == 'event') { + $event = Event::find($request->model_id); + $record = ScheduledNotification::where( + 'notification', + Serializer::create()->serializeNotifiable(new EventReminder($event)) + )->where([ + 'target_id' => auth()->user()->id, + 'target_type' => 'App\User' + ])->first(); + + if($record) { + $record->delete(); + } + } + + return response()->json([ + 'success' => true, + 'newtext' => 'Request Reminder', + 'code' => 'success', + 'title' => 'Success!', + 'message' => 'Reminder Cancelled.' + ]); + } else { + Playlist::create([ + 'model_type' => $request->model_type, + 'model_id' => $request->model_id, + 'playlist_type' => $request->type, + 'user_id' => auth()->user()->id, + ]); + + // Schedule Reminder + try { + if($request->model_type == 'event') { + $event = Event::find($request->model_id); + auth()->user()->notifyAt( + new EventReminder($event), + Carbon::parse(Timezone::convertToLocal($event->start_date_time)) + ); + } + } catch(\Exception $e) { + logger("Runtime Error:" . $e->getMessage()); + } + + return response()->json([ + 'success' => true, + 'newtext' => 'Cancel Reminder', + 'code' => 'success', + 'title' => 'Success!', + 'message' => 'Reminder Requested.', + ]); + } + } + + /** + * 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) + { + // + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param int $id + * @return \Illuminate\Http\Response + */ + public function update(Request $request, $id) + { + // + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function destroy($id) + { + // + } +} diff --git a/backup/app/Http/Controllers/Presenter/EventController.php b/backup/app/Http/Controllers/Presenter/EventController.php new file mode 100644 index 0000000..6e8bbf4 --- /dev/null +++ b/backup/app/Http/Controllers/Presenter/EventController.php @@ -0,0 +1,96 @@ + false, + 'pageHeader' => true, + 'mainLayoutType' => 'subscriber' + ]); + } + /** + * Display a listing of the resource. + * + * @return \Illuminate\Http\Response + */ + public function index() + { + + if(request()->ajax()) { + + $events = Event::join('users', 'users.id', '=', 'events.user_id') + ->join('event_user', 'event_user.event_id', '=', 'events.id') + ->where('event_user.user_id', auth()->user()->id) + ->where('events.status', 'publish'); + + if(request()->get('view') == 'calendar') { + $events->select('events.*', 'start_date_time as start'); + return $events->get()->toJson(); + } + + $events->select('events.*', 'users.name as user_name', 'users.last_name as user_last_name', 'users.email as user_email'); + + return datatables()->of($events) + ->editColumn('title', function($event) { + return Helper::tooltip($event->title, 25); + }) + ->editColumn('created_at', function($event) { + return Timezone::convertToLocal($event->created_at, 'd M Y'); + }) + ->editColumn('status', function($event) { + return $event->statusHtml(); + }) + ->editColumn('start_date_time', function($event) { + return Timezone::convertToLocal($event->start_date_time, 'd M Y h:i A'); + }) + ->addColumn('user_name', function($event) { + $user = $event->user_name . $event->user_last_name ?? ""; + return $user . "
" . "{$event->user_email}"; + }) + ->addColumn('action', function($event) { + $eventInfoUrl = route('presenter.events.show', $event->id); + $liveUrl = route('live.event.index', $event->id); + return " + + Enter Live + "; + + }) + ->rawColumns(['action', 'is_active', 'users', 'status', 'title', 'user_name']) + ->make(true); + } else { + + $breadcrumbs = [ + ['link' => "/", 'name' => "Dashboard"], + ['name' => "Events"] + ]; + return view('/content/events/presenter/index', compact('breadcrumbs')); + } + + } + + public function show($id) + { + $record = Event::findOrFail($id); + $record->start_date_time = Timezone::convertToLocal($record->start_date_time, 'd M Y h:i A'); + return view('/content/events/manage/show', compact('record')); + } +} diff --git a/backup/app/Http/Controllers/PresenterController.php b/backup/app/Http/Controllers/PresenterController.php new file mode 100644 index 0000000..b07eb41 --- /dev/null +++ b/backup/app/Http/Controllers/PresenterController.php @@ -0,0 +1,270 @@ +ajax()) { + switch(request()->get('view')) { + case 'all': + $users = User::role('presenter')->where('id', '<>', auth()->user()->id); + break; + case 'trash': + $users = User::role('presenter')->onlyTrashed()->where('id', '<>', auth()->user()->id); + break; + } + + return datatables()->of($users) + ->editColumn('created_at', function($user) { + return Timezone::convertToLocal($user->created_at, 'd M Y'); + }) + ->editColumn('is_active', function($user) { + if($user->approved()) { + return $user->statusHtml(); + } else if($user->profile_status == 'decline') { + return 'Declined'; + } else { + return 'Not Approved'; + } + }) + ->addColumn('action', function($user) { + $deleteUrl = route('presenters.destroy', $user->id); + + if($user->trashed()) { + $url = route('presenters.restore', $user->id); + + return " + + + + "; + } else { + $url = route('presenters.edit', $user->id); + + return " + + + + "; + + } + }) + ->rawColumns(['action', 'is_active']) + ->make(true); + } else { + $pageConfigs = ['pageHeader' => true]; + $breadcrumbs = [ + ['link' => "/", 'name' => "Dashboard"], + ['name' => "Presenters"] + ]; + return view('/content/presenters/index', compact('breadcrumbs')); + } + + } + + /** + * Show the form for creating a new resource. + * + * @return \Illuminate\Http\Response + */ + public function create() + { + return view('/content/presenters/create'); + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function store(Request $request) + { + $request->validate($this->validationRules()); + + $user = new User(); + $user->name = $request->name; + $user->email = $request->email; + $user->password = Hash::make($request->password); + $user->is_active = true; + $user->save(); + + $user->syncRoles(['presenter']); + + if($request->has('notify')) { + // Todo - Send Credentias on email. + $user->sendCredentials($request->password); + } + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Presenter created successfully.' + ]); + } + + /** + * 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) + { + $user = User::withTrashed()->findOrFail($id); + $userMeta = []; + $userMetaRecords = UserMeta::where('user_id', $user->id)->get(); + foreach ($userMetaRecords as $meta) { + $userMeta[$meta->meta_key] = $meta->meta_value; + } + $userAddress = $user->address('institution_address'); + return view('/content/presenters/edit', compact('user', 'userAddress', 'userMeta')); + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param int $id + * @return \Illuminate\Http\Response + */ + public function update(Request $request, $id) + { + $user = User::findOrFail($id); + // $passwordValidation = !empty($request->password) ? 'required|min:6' : ''; + // $request->validate($this->validationRules([ + // 'email' => 'required|email|unique:users,email,' . $id, + // 'password' => $passwordValidation + // ])); + + // $user->name = $request->name; + // $user->email = $request->email; + // if(!empty($request->password)) { + // $user->password = Hash::make($request->password); + // } + if($request->has('profile_status') && in_array($request->profile_status, array_keys(config('setting.profile_status')))) { + $user->profile_status = $request->profile_status; + $user->notify(new AccountApproved); + } + + if($request->has('is_active')) { + $user->is_active = $request->is_active == 1 ? true : false; + } + $user->save(); + + + if(!empty($request->password) && $request->has('notify')) { + // Todo - Send Credentias on email. + $user->sendCredentials($request->password); + } + // Todo - Send Credentias on email. + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Presenter updated successfully.' + ]); + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function destroy($id) + { + $user = User::withTrashed()->findOrFail($id); + if ($user->trashed()) { + $user->forceDelete(); + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Presenter permanently deleted successfully.' + ]); + } else { + $user->delete(); + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Presenter moved to trash successfully.' + ]); + } + } + + public function restore($id) + { + $user = User::withTrashed()->findOrFail($id); + if($user->trashed()) { + $user->restore(); + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Presenter user restored successfully.' + ]); + } else { + return response()->json([ + 'message' => 'Not found' + ], 404); + } + } + + public function validationRules($overrideRule = []) + { + $rules = [ + 'name' => 'required|max:255', + 'email' => 'required|email|max:255|unique:users', + 'password' => 'required|min:6|max:255' + ]; + return array_merge($rules, $overrideRule); + } + +} diff --git a/backup/app/Http/Controllers/ResidentController.php b/backup/app/Http/Controllers/ResidentController.php new file mode 100644 index 0000000..8295d7a --- /dev/null +++ b/backup/app/Http/Controllers/ResidentController.php @@ -0,0 +1,141 @@ +select('residents.*') + ->where('users.name', 'Like',$search.'%') + ->get(); + + } + else { + + $residents=Resident::orderBy('house_id')->get(); + } + + return view('residents.index', compact('residents')); + } + + + public function create($id) + { + $users= User::where('usertype_id',2)->orderby('name','asc')->get(); + + $houses = House::where('house_type', 'house')->get(); + + return view('residents.create', compact('users', 'houses' , 'id')); + } + + public function store(Request $request, Resident $resident) + { + $attributes =$request->validate([ + 'house_id' => 'required', + 'user_id' => 'required', + 'isOwner' => 'required', + 'datofoccupancy' => 'required|date' + ]); + + $resident = Resident::recordExist($attributes)->first(); + + if($resident) + { + return back()->with('error', 'Record Already Exist'); + } + + $owner= Resident::where('house_id', $attributes['house_id'])->where('isOwner', 1)->first(); + + if($owner) + { + if($attributes['isOwner']) + { + + return back()->with('error', 'Owner Already Exist'); + } + } + + Resident::create([ + 'house_id' => $attributes['house_id'], + 'user_id' => $attributes['user_id'], + 'isOwner' => $attributes['isOwner'], + 'datofoccupancy' => Carbon::parse($attributes['datofoccupancy'])->format('d-m-Y') + ]); + + if($request->house) + { + return redirect()->route('houses.show', $request->house)->with('success', 'Resident Added Successfully'); + } + else + { + return redirect()->route('residents.index')->with('success', 'Resident Added Successfully'); + } + } + + public function show(Resident $resident) + { + // + } + + public function edit(Resident $resident) + { + $users= User::where('usertype_id',User::RESIDENT)->orderby('name','asc')->get(); + + $houses = House::where('house_type', 'house')->get(); + + $occupancyTypes = ['0' => 'Tenant', '1' => 'Owner']; + + return view('residents.edit', compact('users', 'resident', 'houses', 'occupancyTypes')); + } + + public function update(Request $request, Resident $resident) + { + $attributes =$request->validate([ + 'house_id' => 'required', + 'isOwner' => 'required', + 'user_id' => 'required', + 'datofoccupancy' => 'required|date' + ]); + + $owner= Resident::where('house_id', $attributes['house_id'])->where('isOwner', 1)->where('id', '!=', $resident->id)->first(); + + if($owner) + { + if($attributes['isOwner']) + { + + return back()->with('error', 'Owner Already Exist'); + } + } + + + $resident->update([ + 'user_id' => $attributes['user_id'], + 'datofoccupancy' => Carbon::parse($attributes['datofoccupancy'])->format('d-m-Y'), + 'house_id' => $attributes['house_id'], + 'isOwner' => $attributes['isOwner'], + ]); + + return redirect()->route('residents.index'); + } + + public function destroy(Resident $resident) + { + $resident->delete(); + + return back()->with('success', 'Record Deleted Successfully'); + } +} diff --git a/backup/app/Http/Controllers/SocietyController.php b/backup/app/Http/Controllers/SocietyController.php new file mode 100644 index 0000000..c213a75 --- /dev/null +++ b/backup/app/Http/Controllers/SocietyController.php @@ -0,0 +1,88 @@ +validate([ + + 'name' => 'required|max:255|min:3|unique:societies', + 'description' => 'required|min:3', + ]); + + if($req->file('image')) + { + + $path = $req->file('image')->store('public/files'); + + $attributes+=[ + + 'image' => $path, + ]; + } + + Society::create($attributes); + + return redirect()->route('society.index'); + } + + // public function edit(Society $society) + // { + + // return view('societies.edit', compact('society')); + // } + + public function update(Request $request, $id) + { + + $society = Society::findOrFail($id); + + $validator = Validator::make($request->all(), [ + + 'name' => 'required|max:255|min:3', + 'description' => 'required|min:3', + ]); + + if ($validator->fails()) { + return response()->json([ + 'error' => $validator->errors() + ]); + } + + $society->update([ + 'name' => $request->name, + 'description' => $request->description, + ]); + + return response()->json(['success'=>'society updated successfully']); + } + + public function delete(Society $society) + { + $society->delete(); + + + return redirect()->route('society.index'); + } +} diff --git a/backup/app/Http/Controllers/Subscriber/EventController.php b/backup/app/Http/Controllers/Subscriber/EventController.php new file mode 100644 index 0000000..ef491c5 --- /dev/null +++ b/backup/app/Http/Controllers/Subscriber/EventController.php @@ -0,0 +1,74 @@ + false, + 'pageHeader' => false, + 'mainLayoutType' => 'subscriber' + ]); + } + + public function index() + { + if (request()->get('s')) { + $events = Event::where('status', Event::UPCOMING) + ->whereHas('keywords', function ($q) { + $q->where('keyword_name', 'like', "%" . request()->get('s') . "%"); + }); + } else { + $events = Event::where('status', Event::UPCOMING); + } + + $events->orderBy('start_date_time', 'asc'); + + $events = $events->paginate(9); + + return view('content/subscriber/events/index', compact('events')); + } + + public function show(Request $request, $id) + { + $pageConfigs = [ + 'pageHeader' => false, + 'showMenu' => false, + 'verticalMenuNavbarType' => 'hidden', + 'pageClass' => 'chat-application', + 'mainLayoutType' => 'subscriber' + ]; + + $event = Event::findOrFail($id); + + if( auth()->user()->hasRole('super_admin') || auth()->user()->id == $event->user_id ) {} else { + if($event->status != Event::UPCOMING) { + abort(403, "Access Denied"); + } + } + + $event->token = $event->generateToken(); + + $keywords = $event->keywords()->pluck('keyword_name')->toArray(); + $events = Event::where('status', Event::UPCOMING) + ->whereHas('keywords', function ($q) use ($keywords) { + foreach($keywords as $keyword) { + $q->orWhere('keyword_name', 'like', "%" . $keyword . "%"); + } + }) + ->where('id', '<>', $event->id) + ->orderBy('start_date_time', 'asc')->limit(3)->get(); + + return view('content/subscriber/events/show', compact('event', 'events', 'pageConfigs')); + } +} diff --git a/backup/app/Http/Controllers/Subscriber/VideoController.php b/backup/app/Http/Controllers/Subscriber/VideoController.php new file mode 100644 index 0000000..ae6ddc5 --- /dev/null +++ b/backup/app/Http/Controllers/Subscriber/VideoController.php @@ -0,0 +1,67 @@ + false, + 'pageHeader' => false, + 'mainLayoutType' => 'subscriber' + ]); + } + + public function index() + { + if (request()->get('s')) { + $videos = Video::where('status', 'publish') + ->whereHas('keywords', function ($q) { + $q->where('keyword_name', 'like', "%" . request()->get('s') . "%"); + }); + } else { + $videos = Video::where('status', 'publish'); + } + + $videos = $videos->paginate(9); + + return view('content/subscriber/videos/index', compact('videos')); + } + + public function show(Request $request, $id) + { + $pageConfigs = [ + 'pageHeader' => false, + 'showMenu' => false, + 'verticalMenuNavbarType' => 'hidden', + 'pageClass' => 'chat-application', + 'mainLayoutType' => 'subscriber' + ]; + + $video = Video::findOrFail($id); + if( auth()->user()->hasRole('super_admin') || auth()->user()->id == $video->user_id ) {} else { + if($video->status != 'publish') { + abort(403, "Access Denied"); + } + } + $keywords = $video->keywords()->pluck('keyword_name')->toArray(); + + $videos = Video::where('status', 'publish') + ->whereHas('keywords', function ($q) use ($keywords) { + foreach($keywords as $keyword) { + $q->orWhere('keyword_name', 'like', "%" . $keyword . "%"); + } + })->limit(3)->get(); + + return view('content/subscriber/videos/show', compact('video', 'videos', 'pageConfigs')); + } +} diff --git a/backup/app/Http/Controllers/SubscriberController.php b/backup/app/Http/Controllers/SubscriberController.php new file mode 100644 index 0000000..0ad104b --- /dev/null +++ b/backup/app/Http/Controllers/SubscriberController.php @@ -0,0 +1,259 @@ +ajax()) { + switch (request()->get('view')) { + case 'all': + $users = User::role('subscriber')->where('users.id', '<>', auth()->user()->id); + break; + case 'trash': + $users = User::role('subscriber')->leftJoin('subscriptions', 'subscriptions.user_id', '=', 'users.id') + ->onlyTrashed() + ->where('users.id', '<>', auth()->user()->id)->select('users.*', 'subscriptions.stripe_status as stripe_status'); + break; + } + $users->where('email_verified_at', '<>', NULL); + + if(request()->get('can_contact')) { + $users->where('can_contact', request()->get('can_contact')); + } + if(request()->get('subscription_status')) { + // $users->where('can_contact', request()->get('can_contact')); + } + + return datatables()->of($users) + ->editColumn('created_at', function ($user) { + return Timezone::convertToLocal($user->created_at, 'd M Y'); + }) + ->editColumn('email', function($user) { + return "{$user->email}"; + }) + ->editColumn('last_name', function($user) { + if(is_null($user->last_name) || $user->last_name == "") { + return "N/A"; + } + return $user->last_name; + }) + ->editColumn('is_active', function ($user) { + return $user->statusHtml(); + }) + ->editColumn('can_contact', function($user) { + return $user->can_contact ? "Yes" : "No"; + }) + ->addColumn('subscription_status', function($user) { + if ($user->subscribed('default')) { + return "Subscribed"; + } else { + return "Not Subscribed"; + } + }) + ->addColumn('action', function ($user) { + + $showUrl = route('users.show', $user->id); + $title = $user->fullName() . " - " . $user->email; + return " + + "; + + }) + ->rawColumns(['action', 'is_active', 'subscription_status', 'email']) + ->make(true); + } else { + $pageConfigs = ['pageHeader' => true]; + $breadcrumbs = [ + ['link' => "/", 'name' => "Dashboard"], + ['name' => "Subscribers"] + ]; + return view('/content/users/index', compact('breadcrumbs')); + } + } + + /** + * Show the form for creating a new resource. + * + * @return \Illuminate\Http\Response + */ + public function create() + { + return view('/content/users/create'); + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function store(Request $request) + { + $request->validate($this->validationRules()); + + $user = new User(); + $user->name = $request->name; + $user->email = $request->email; + $user->password = Hash::make($request->password); + $user->is_active = true; + $user->save(); + + $user->syncRoles(['user']); + + if ($request->has('notify')) { + // Todo - Send Credentias on email. + $user->sendCredentials($request->password); + } + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Subscriber created successfully.' + ]); + } + + /** + * Display the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function show($id) + { + $user = User::withTrashed()->findOrFail($id); + $userMeta = []; + $userMetaRecords = UserMeta::where('user_id', $user->id)->get(); + foreach ($userMetaRecords as $meta) { + $userMeta[$meta->meta_key] = $meta->meta_value; + } + $userAddress = $user->address('institution_address'); + return view('/content/users/show', compact('user', 'userAddress', 'userMeta')); + } + + /** + * Show the form for editing the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function edit($id) + { + $user = User::findOrFail($id); + return view('/content/users/edit', compact('user')); + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param int $id + * @return \Illuminate\Http\Response + */ + public function update(Request $request, $id) + { + $user = User::findOrFail($id); + $passwordValidation = !empty($request->password) ? 'required|min:6' : ''; + $request->validate($this->validationRules([ + 'email' => 'required|email|unique:users,email,' . $id, + 'password' => $passwordValidation + ])); + + $user->name = $request->name; + $user->email = $request->email; + if (!empty($request->password)) { + $user->password = Hash::make($request->password); + } + $user->is_active = $request->is_active == 1 ? true : false; + $user->save(); + + + if (!empty($request->password) && $request->has('notify')) { + // Todo - Send Credentias on email. + $user->sendCredentials($request->password); + } + // Todo - Send Credentias on email. + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Subscriber updated successfully.' + ]); + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function destroy($id) + { + $user = User::withTrashed()->findOrFail($id); + if ($user->trashed()) { + $user->forceDelete(); + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Subscriber permanently deleted successfully.' + ]); + } else { + $user->delete(); + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Subscriber moved to trash successfully.' + ]); + } + } + + public function restore($id) + { + $user = User::withTrashed()->findOrFail($id); + if ($user->trashed()) { + $user->restore(); + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Subscriber restored successfully.' + ]); + } else { + return response()->json([ + 'message' => 'Not found' + ], 404); + } + } + + public function validationRules($overrideRule = []) + { + $rules = [ + 'name' => 'required|max:255', + 'email' => 'required|email|max:255|unique:users', + 'password' => 'required|min:6|max:255' + ]; + return array_merge($rules, $overrideRule); + } +} diff --git a/backup/app/Http/Controllers/Subscriptions/PaymentController.php b/backup/app/Http/Controllers/Subscriptions/PaymentController.php new file mode 100644 index 0000000..8fc3a15 --- /dev/null +++ b/backup/app/Http/Controllers/Subscriptions/PaymentController.php @@ -0,0 +1,28 @@ + auth()->user()->createSetupIntent() + ]; + + return view('subscriptions.payment')->with($data); + } + + public function store(Request $request) { + $this->validate($request, [ + 'token' => 'required' + ]); + + $request->user()->newSubscription('default', 'price_1IWmwFGJDz1oPimHukgcaXhe')->create($request->token); + + return back(); + } +} diff --git a/backup/app/Http/Controllers/Subscriptions/SubscriptionController.php b/backup/app/Http/Controllers/Subscriptions/SubscriptionController.php new file mode 100644 index 0000000..273daee --- /dev/null +++ b/backup/app/Http/Controllers/Subscriptions/SubscriptionController.php @@ -0,0 +1,25 @@ +user()->newSubscription('default', 'price_1IWmwFGJDz1oPimHukgcaXhe') + ->trialDays(3) + ->allowPromotionCodes() + ->checkout(); + $checkouts['professor'] = auth()->user()->newSubscription('default', 'price_1IWmwFGJDz1oPimHukgcaXhe') + ->allowPromotionCodes() + ->checkout(); + $checkouts['student'] = auth()->user()->newSubscription('default', 'price_1IWmwFGJDz1oPimHukgcaXhe') + ->allowPromotionCodes() + ->checkout(); + $plans = config('plan'); + return view('subscriptions.plans', compact('plans', 'checkouts')); + } +} diff --git a/backup/app/Http/Controllers/TableController.php b/backup/app/Http/Controllers/TableController.php new file mode 100644 index 0000000..49a272c --- /dev/null +++ b/backup/app/Http/Controllers/TableController.php @@ -0,0 +1,46 @@ + "/", 'name' => "Home"], ['name' => "Table Bootstrap"]]; + return view('/content/table/table-bootstrap/table-bootstrap', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Datatable Basic + public function datatable_basic() + { + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Datatable"], ['name' => "Basic"]]; + return view('/content/table/table-datatable/table-datatable-basic', ['breadcrumbs' => $breadcrumbs]); + } + + // Datatable Basic + public function datatable_advance() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Datatable"], ['name' => "Advanced"] + ]; + return view('/content/table/table-datatable/table-datatable-advance', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // ag-Grid Table + public function ag_grid() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['name' => "agGrid Table"] + ]; + return view('/content/table/table-ag-grid/table-ag-grid', [ + 'breadcrumbs' => $breadcrumbs + ]); + } +} diff --git a/backup/app/Http/Controllers/UserController.php b/backup/app/Http/Controllers/UserController.php new file mode 100644 index 0000000..fa64cf8 --- /dev/null +++ b/backup/app/Http/Controllers/UserController.php @@ -0,0 +1,337 @@ +orderBy('name', 'asc') + ->get(); + + } + + return view('users.index', compact('users')); + } + + + public function create() + { + $usertypes = Usertype::get(); + + return view('users.create', compact('usertypes')); + } + + + public function store(Request $request) + { + $request->validate([ + 'name' => 'required|max:255|min:3', + 'mobile1' => 'required|unique:users,mobile1|gt:0|numeric', + 'mobile2' => 'nullable|unique:users|gt:0|numeric', + 'email' => 'nullable|unique:users|email', + 'password' => 'required|min:8', + 'confirmPassword' => 'required|same:password', + 'usertype_id' => 'required', + ]); + + User::create([ + 'name' => $request->name, + 'password' => Hash::make($request->password), + 'mobile1' => $request->mobile1, + 'mobile2' => $request->mobile2, + 'email' => $request->email, + 'usertype_id' => $request->usertype_id, + ]); + + return redirect()->route('users.index')->with('success', 'User Created Successfully'); + } + + + public function show(string $id) + { + // + } + + + public function edit(User $user) + { + $usertypes = Usertype::get(); + + return view('users.edit', compact('usertypes', 'user')); + } + + + public function update(Request $request, User $user) + { + $user = User::findOrFail($user->id); + + $attributes = $request->validate([ + 'name' => 'required|max:255|min:3', + 'mobile1' => [ + 'required', + 'gt:0', + 'numeric', + Rule::unique('users')->ignore($user), + ], + 'mobile2' => [ + 'nullable', + 'gt:0', + 'numeric', + Rule::unique('users')->ignore($user), + ], + 'email' => [ + 'nullable','email' + ], + 'usertype_id' => 'required' + ]); + + $password = $request->validate([ + 'password' => 'nullable|min:8', + 'confirmPassword' => 'same:password', + ]); + + if(!empty($password['password'])) + { + $user->update([ + 'password' => Hash::make( $password['password']) + ]); + } + + $user->update($attributes); + + return redirect()->route('users.index')->with('success', 'User Updated Successfully'); + } + + + public function destroy($id) + { + $user = User::findOrFail($id); + + if($user->usertype_id == USER::ADMIN) + { + $count = User::where('usertype_id',1)->get()->count(); + if($count > 1) + { + $user->delete(); + return back()->with('success','Admin Deleted Successfully'); + } + else + { + return back()->with('error','Admin Cant Delete Himself'); + } + } + $user->delete(); + + return back()->with('success', 'User Deleted Successfully'); + } + public function home() + { + $house_ids = Auth::user()->houses()->get()->pluck('id'); + $paymentsByMonth = collect(); + + foreach ($house_ids as $house_id) { + $payments = Payment::where('house_id', $house_id) + ->get() + ->groupBy('billingmonth') + ->map(function ($group) { + return $group->sum('amount'); + }); + + $paymentsByMonth = $paymentsByMonth->mergeRecursive($payments); + } + + $paymentsByMonth = $paymentsByMonth->map(function ($values) { + return collect($values)->sum(); + }); + + $paymentsByMonth= $paymentsByMonth->toArray(); + + return view('users.home',compact('paymentsByMonth')); + } + + public function profileEdit() + { + $usertypes = Usertype::get(); + + $user = Auth::user(); + + return view('users.profileEdit', compact('user', 'usertypes')); + } + + public function profileupdate(Request $request, User $user) + { + + $user = User::findOrFail($user->id); + + $attributes = $request->validate([ + 'name' => 'required|max:255|min:3', + 'mobile1' => [ + 'required', + 'numeric', + 'gt:0', + Rule::unique('users')->ignore($user), + ], + 'mobile2' => [ + 'nullable', + 'numeric', + 'gt:0', + Rule::unique('users')->ignore($user), + ], + 'email' => [ + 'nullable', + 'email', + Rule::unique('users')->ignore($user), + ], + ]); + + $user->update($attributes); + + return redirect()->route('user.home')->with('success', 'Profile Updated Successfully'); + } + public function report() + { + $months = config('global.months'); + + return view('users.report',compact('months')); + } + + public function profile() + { + $user = Auth::user(); + + return view('users.profile' , compact('user')); + } + public function adminProfile() + { + $user = Auth::user(); + + return view('adminprofile' , compact('user')); + } + + public function resetPassword(User $user, Request $request) + { + $request->validate([ + + 'oldPassword' => 'required|min:8', + 'newPassword' => 'required|min:8', + 'confirmPassword' => 'required|same:newPassword|min:8' + ]); + + if (Hash::check($request->oldPassword, $user->password)) + { + $user->update([ + + 'password' => Hash::make($request->newPassword) + ]); + + return back()->with('success', 'Password Changed Successfully'); + } + else + { + return back()->with('error', 'Current Password is Incorrect'); + } + } + public function forgetpassword(Request $request) + { + $user = User::where('mobile1', $request->mobile)->first(); + + if($user) + { + if($user->email) + { + + Notification::send($user, new ForgetPassword($user)); + + return back()->with('success', 'Please Check Your Mail'); + } + else + { + + return back()->with('success', 'Please Contact Admin (XXXX XXX XXX)'); + + } + } + else + { + return back()->with('success', 'Please Enter Registered Number'); + } + } + + public function forget($id) + { + $user= User::where('id',$id)->first(); + + return view('users/forgetpasswordcreate', compact('user')); + } + public function forgetstore(User $user, Request $req) + { + $req->validate([ + 'password' => 'required|min:8', + 'confirmPassword' => 'required|same:password' + ]); + + $user->update([ + 'password' => Hash::make($req->password) + ]); + + return redirect("/")->with('success', 'Password Changed Successfully'); + } + + public function imagestore(Request $request) + { + $this->validate($request, [ + 'image' => 'required|image|mimes:jpg,png,jpeg,gif,svg', + ]); + + $image_path = $request->file('image')->storeAs('public/image', 'UserImage'.time().'.jpg'); + + Auth()->user()->update([ + 'user_image' => str_replace('public/','',$image_path) + ]); + + return back()->with('success', 'Image Updated Successfully'); + } + + public function resetcreate(User $user) + { + + return view('reset',compact('user')); + } + + public function userresetcreate(User $user) + { + + return view('users.reset',compact('user')); + } + + public function imageDestroy(User $user) { + if($user->user_image){ + $user->update([ + 'user_image' => null + ]); + return back()->with('success','image removed successfully'); + } + return back(); + } +} diff --git a/backup/app/Http/Controllers/UserInterfaceController.php b/backup/app/Http/Controllers/UserInterfaceController.php new file mode 100644 index 0000000..4229073 --- /dev/null +++ b/backup/app/Http/Controllers/UserInterfaceController.php @@ -0,0 +1,41 @@ + "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "UI"], ['name' => "Typography"] + ]; + return view('/content/ui-pages/ui-typography', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // UI Elements - Colors + public function colors() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "UI"], ['name' => "Colors"] + ]; + return view('/content/ui-pages/ui-colors', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Icons Feather + public function icons_feather() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "UI"], ['name' => "Feather Icons"] + ]; + return view('/content/ui-pages/icons-feather', [ + 'breadcrumbs' => $breadcrumbs + ]); + } +} diff --git a/backup/app/Http/Controllers/VideoController.php b/backup/app/Http/Controllers/VideoController.php new file mode 100644 index 0000000..d773adf --- /dev/null +++ b/backup/app/Http/Controllers/VideoController.php @@ -0,0 +1,339 @@ +ajax()) { + + if (auth()->user()->hasRole('super_admin')) { + $videos = Video::with('user')->where('videos.id', '<>', 0); + if (request()->get('view') == 'trash') { + $videos->onlyTrashed(); + } + } else { + + if (request()->get('view') == 'trash') { + + $videos = Video::onlyTrashed()->leftJoin('events', 'events.id', '=', 'videos.event_id') + ->leftJoin('event_user', 'event_user.event_id', '=', 'events.id') + ->where(function($query) { + $query->where('event_user.user_id', auth()->user()->id); + $query->orWhere('videos.user_id', auth()->user()->id); + }) + ->select('videos.*'); + } else { + $videos = Video::leftJoin('events', 'events.id', '=', 'videos.event_id') + ->leftJoin('event_user', 'event_user.event_id', '=', 'events.id') + ->where(function($query) { + $query->where('event_user.user_id', auth()->user()->id); + $query->orWhere('videos.user_id', auth()->user()->id); + }) + ->select('videos.*'); + } + } + + + if (request()->get('video_status') != "") { + $videos->where('videos.status', request()->get('video_status')); + } + + return datatables()->of($videos) + ->editColumn('title', function ($video) { + $title = Helper::tooltip($video->title, 50); + $videoLink = route('subscriber.videos.show', $video->id); + return "$title "; + }) + ->editColumn('path', function($video) { + $video->path = config('setting.s3_url') . $video->path; + return "View"; + }) + ->editColumn('created_at', function ($video) { + return Timezone::convertToLocal($video->created_at, 'd M Y'); + }) + ->editColumn('status', function ($video) { + return $video->statusHtml(); + }) + ->editColumn('start_date_time', function ($video) { + return Timezone::convertToLocal($video->start_date_time, 'd M Y h:i A'); + }) + ->addColumn('users', function ($video) { + if (isset($video->user->id)) { + if (auth()->user()->id == $video->user->id) { + return "Me"; + } else { + $user = $video->user; + return $video->user->fullName() . "
" . "{$user->email}"; + } + } else { + return "N/A"; + } + }) + ->addColumn('last_name', function($video) { + if(!isset($video->user->id)) { return "N/A"; } + return $video->user->last_name; + }) + ->addColumn('email', function($video) { + if(!isset($video->user->id)) { return "N/A"; } + return $video->user->email; + }) + ->addColumn('action', function ($video) { + + $deleteUrl = route('videos.destroy', $video->id); + + if ($video->trashed()) { + $url = route('videos.restore', $video->id); + + return " + + + + "; + } else { + $url = route('videos.edit', $video->id); + + return " + + + + + "; + } + }) + ->rawColumns(['action', 'path', 'is_active', 'users', 'status', 'title']) + ->make(true); + } else { + + $pageConfigs = ['pageHeader' => true]; + $breadcrumbs = [ + ['link' => "/", 'name' => "Dashboard"], + ['name' => "Videos"] + ]; + return view('/content/videos/manage/index', compact('breadcrumbs')); + } + } + + /** + * Show the form for creating a new resource. + * + * @return \Illuminate\Http\Response + */ + public function create() + { + return view('/content/videos/manage/create'); + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function store(Request $request) + { + $request->validate([ + 'title' => 'required|max:255', + 'video' => 'mimes:mp4,jpg,jpeg|nullable', + 'status' => 'required|in:publish,pending' + ]); + + $path = Storage::disk('s3')->put('videos', $request->video); + + $video = Video::create([ + 'title' => $request->title, + 'status' => $request->status, + 'user_id' => auth()->user()->id, + 'path' => $path + ]); + + foreach($request->keywords as $keywordId) { + if(!is_numeric($keywordId)) { + $keyword = Keyword::create([ + 'keyword_name' => $keywordId, + ]); + $keywordId = $keyword->id; + } + + $keywordIds[] = $keywordId; + } + + $video->keywords()->sync($keywordIds ?? []); + + if ($request->hasFile('logo')) { + $video->addOrUpdateLogo($request->file('logo')); + } + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'message' => 'File uploaded successfully.', + 'title' => 'Congratulations', + 'path' => $path + ]); + } + + /** + * Display the specified resource. + * + * @param \App\Video $video + * @return \Illuminate\Http\Response + */ + public function show(Video $video) + { + // + } + + /** + * Show the form for editing the specified resource. + * + * @param \App\Video $video + * @return \Illuminate\Http\Response + */ + public function edit(Video $video) + { + return view('/content/videos/manage/edit', compact('video')); + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param \App\Video $video + * @return \Illuminate\Http\Response + */ + public function update(Request $request, Video $video) + { + $request->validate([ + 'title' => 'required|max:255', + 'status' => 'required|in:publish,pending' + ]); + + $video->title = $request->title; + $video->status = $request->status; + $video->save(); + + $keywordIds = []; + + foreach($request->keywords as $keywordId) { + if(!is_numeric($keywordId)) { + $keyword = Keyword::create([ + 'keyword_name' => $keywordId, + ]); + $keywordId = $keyword->id; + } + + $keywordIds[] = $keywordId; + } + + $video->keywords()->sync($keywordIds ?? []); + + if ($request->hasFile('logo')) { + $video->addOrUpdateLogo($request->file('logo')); + } + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations!', + 'message' => 'Video information updated successfully.' + ]); + } + + /** + * Remove the specified resource from storage. + * + * @param \App\Video $video + * @return \Illuminate\Http\Response + */ + public function destroy(Video $video) + { + // $record = Event::withTrashed()->findOrFail($id); + $record = $video; + if ($record->trashed()) { + if ($record->path) { + $pathLocation = $record->path; + } else { + $pathLocation = ""; + } + + $record->forceDelete(); + + if (!empty($pathLocation)) { + // Storage::disk('s3')->delete($pathLocation); + } + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Video permanently deleted successfully.' + ]); + } else { + $record->delete(); + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Video moved to trash successfully.' + ]); + } + } + + public function restore($id) + { + $record = Video::withTrashed()->findOrFail($id); + if ($record->trashed()) { + $record->restore(); + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Video restored successfully.' + ]); + } else { + return response()->json([ + 'message' => 'Not found' + ], 404); + } + } +} diff --git a/backup/app/Http/Controllers@20230511/AccountController.php b/backup/app/Http/Controllers@20230511/AccountController.php new file mode 100644 index 0000000..2fb45ce --- /dev/null +++ b/backup/app/Http/Controllers@20230511/AccountController.php @@ -0,0 +1,400 @@ + "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Pages"], ['name' => "Account Settings"]]; + + if ( auth()->user()->hasRole('super_admin') || auth()->user()->hasRole('admin')) { + $pageConfigs = [ + 'pageHeader' => false, + ]; + } else { + $pageConfigs = [ + 'pageHeader' => false, + 'mainLayoutType' => 'subscriber', + 'showMenu' => false + ]; + } + + $userMeta = []; + $userMetaRecords = UserMeta::where('user_id', auth()->user()->id)->get(); + foreach ($userMetaRecords as $meta) { + $userMeta[$meta->meta_key] = $meta->meta_value; + } + + $userAddress = auth()->user()->address('institution_address'); + + return view('account/index', [ + 'breadcrumbs' => $breadcrumbs, + 'pageConfigs' => $pageConfigs, + 'userMeta' => $userMeta, + 'userAddress' => $userAddress + ]); + } + + public function changePassword() + { + $user = auth()->user(); + + request()->validate([ + 'current_password' => [ + 'required', + function ($attribute, $value, $fail) use ($user) { + if (!Hash::check($value, $user->password)) { + $fail('Your current password is incorrect.'); + } + }, + ], + 'password' => 'required|min:6|confirmed', + ]); + + $user->password = bcrypt(request()->get('password')); + $user->save(); + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'message' => 'Password changed successfully', + 'title' => 'Congatulations!' + ]); + } + + public function changeEmail(Request $request) + { + $user = auth()->user(); + + request()->validate([ + 'email' => [ + 'required', + 'email', + 'confirmed', + 'unique:users,email,' . $user->id + ] + ]); + + $user->email_verified_at = null; + $user->email = request()->get('email'); + $user->save(); + + // Send Email verification + $request->user()->sendEmailVerificationNotification(); + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations!', + 'message' => 'Your email address has changed. Please verify your new email address.' + ]); + } + + public function subscribeToNewsletter(Request $request) + { + $request->validate([ + 'email' => 'required|email' + ]); + + try { + $user = auth()->user(); + Newsletter::subscribeOrUpdate( $request->email, ['FNAME'=> $user->name, 'LNAME'=> $user->last_name] ); + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations!', + 'message' => 'You have subscribed to ' . config('app.name') . ' News & Events successfully.' + ]); + } catch(\Exception $e) { + logger("Mailchimp API Error: " . $e->getMessage()); + return response()->json([ + 'success' => false, + 'title' => 'Oops!', + 'message' => 'Something went wrong.' + ]); + } + } + + public function updateBasicInformation(Request $request) + { + $user = auth()->user(); + request()->validate([ + 'name' => 'required|string|max:255', + 'last_name' => 'required|string|max:255', + 'timezone' => 'required' + ]); + + $user->name = request()->get('name'); + $user->last_name = request()->get('last_name'); + $user->timezone = request()->get('timezone'); + $user->can_contact = $request->has('can_contact') ? true : false; + $user->save(); + + $user->updateOrCreateMeta(USER::EMAIL_NOTIFICATION, request()->has('email_notification') ? true : false); + $user->updateOrCreateMeta("areas_of_interest", json_encode($request->areas_of_interest ?? [])); + $user->updateOrCreateMeta(User::SUBSCRIBE_NEWSLETTER, $request->has('newsletter') ? 1 : 0); + $user->updateOrCreateMeta(User::EMAIL_NOTIFICATION, $request->has('email_notification') ? 1 : 0); + + try { + if($request->has('newsletter')) { + Newsletter::subscribeOrUpdate( $user->email, ['FNAME'=> $user->name, 'LNAME'=> $user->last_name] ); + } else { + Newsletter::unsubscribe($user->email); + } + } catch(\Exception $e) { + logger("Mailchimp API Error: " . $e->getMessage()); + } + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations!', + 'message' => 'Changes saved successfully.' + ]); + } + + public function institutionInfo(Request $request) + { + $user = auth()->user(); + + request()->validate([ + 'institution_name' => 'required|string|max:255', + 'department' => 'required|string|max:255', + 'street_name' => 'required|max:500', + 'city' => 'required|max:255', + 'state' => 'required|max:255', + 'postal_code' => 'required|max:255', + 'country' => 'required|max:255', + ]); + + $user->updateOrCreateMeta("institution_name", $request->institution_name); + $user->updateOrCreateMeta("department", $request->department); + + // Address + $user->updateOrCreateAddress("institution_address", [ + "street_name" => $request->street_name, + "city" => $request->city, + "state" => $request->state, + "postal_code" => $request->postal_code, + "country" => $request->country, + ]); + + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations!', + 'message' => 'Changes saved successfully.' + ]); + } + + public function setup(Request $request) + { + if (auth()->user()->subscribed('default')) { + return redirect(route('home')); + } + switch (request()->method()) { + case 'GET': + $pageConfigs = [ + 'bodyClass' => "bg-full-screen-image", + 'blankPage' => true + ]; + + $userMeta = []; + $userMetaRecords = UserMeta::where('user_id', auth()->user()->id)->get(); + foreach ($userMetaRecords as $meta) { + $userMeta[$meta->meta_key] = $meta->meta_value; + } + + $userAddress = auth()->user()->address('institution_address'); + + $membershipLevels = MembershipLevel::where('parent_id', 0)->get(); + + return view('/account/setup', [ + 'pageConfigs' => $pageConfigs, + 'userMeta' => $userMeta, + 'userAddress' => $userAddress, + 'membershipLevels' => $membershipLevels + ]); + + break; + + case 'POST': + + if (!auth()->user()->hasVerifiedEmail()) { + return response()->json([ + 'success' => false, + 'code' => 'error', + 'title' => 'Oops!', + 'message' => 'Your email address is not verified.', + ]); + } + $request->validate([ + 'institution_name' => 'required|string|max:255' + ]); + + $user = auth()->user(); + $user->can_contact = $request->has('can_contact') ? true : false; + $user->save(); + + $user->updateOrCreateMeta("institution_name", $request->institution_name); + $user->updateOrCreateMeta("department", $request->department); + $user->updateOrCreateMeta("areas_of_interest", json_encode($request->areas_of_interest ?? [])); + + $user->updateOrCreateMeta("hear_about_us", request()->has('hear_us_other') ? $request->hear_us_other : $request->hear_about_us); + $user->updateOrCreateMeta(User::SUBSCRIBE_NEWSLETTER, $request->has('newsletter') ? 1 : 0); + $user->updateOrCreateMeta(User::EMAIL_NOTIFICATION, $request->has('email_notification') ? 1 : 0); + + try { + if($request->has('newsletter')) { + Newsletter::subscribeOrUpdate( $user->email, ['FNAME'=> $user->name, 'LNAME'=> $user->last_name] ); + } else { + Newsletter::unsubscribe($user->email); + } + } catch(\Exception $e) { + logger("Mailchimp API Error " . $e->getMessage()); + } + + // Address + $user->updateOrCreateAddress("institution_address", [ + "street_name" => $request->street_name, + "city" => $request->city, + "state" => $request->state, + "postal_code" => $request->postal_code, + "country" => $request->country, + ]); + + $membershipLevels = []; + foreach (MembershipLevel::all()->toArray() as $record) { + $membershipLevels[$record['id']] = $record; + } + + // Membership Level + for ($i = 1; $i <= 3; $i++) { + $key = 'membership_level_' . $i; + + UserMeta::where([ + 'meta_key' => $key, + 'user_id' => $user->id + ])->delete(); + + $level = request()->get($key); + if (!empty($level)) { + $lastLevel = $level; + $value = $membershipLevels[$level]; + if ($membershipLevels[$level]['required_textbox']) { + $value['other_value'] = request()->get('membership_input_' . $level); + } + $user->updateOrCreateMeta($key, json_encode($value)); + } + } + + // Check if eligible for discount + $membershipLevel = MembershipLevel::find($lastLevel); + + $priceId = auth()->user()->getPriceId(); + + if($priceId == false) { + return response()->json([ + 'success' => false, + 'code' => 'error', + 'title' => 'Oops!', + 'message' => 'Please select your membership level.' + ]); + } + + $checkout = auth()->user()->newSubscription(Helper::SUBSCRIPTION_DEFAULT, $priceId) + ->allowPromotionCodes() + ->checkout([ + 'success_url' => route('home'), + 'cancel_url' => route('subscriber.setup'), + 'billing_address_collection' => 'required', + ]); + + + return view('inc/stripe/btn', compact('checkout')); + + break; + } + } + + public function membershipLevels($parentId) + { + return MembershipLevel::where('parent_id', $parentId)->get(); + } + + public function pendingAccount() + { + $pageConfigs = [ + 'bodyClass' => "bg-full-screen-image", + 'blankPage' => true + ]; + return view('account/pending', compact('pageConfigs')); + } + + public function applyAsPresenter(Request $request) + { + switch ($request->method()) { + case 'GET': + $user = auth()->user(); + $pageConfigs = ['blankPage' => true, 'mainLayoutType' => 'subscriber', 'showMenu' => false]; + $userMeta = []; + $userMetaRecords = UserMeta::where('user_id', $user->id)->get(); + foreach ($userMetaRecords as $meta) { + $userMeta[$meta->meta_key] = $meta->meta_value; + } + $userAddress = $user->address('institution_address'); + return view('content.presenters.apply', compact('user', 'userAddress', 'userMeta', 'pageConfigs')); + // return view('content.presenters.apply', [ + // 'user' => $user, + // 'userAddress' => $userAddress, + // 'userMeta' => $userMeta, + // 'pageConfigs' => $pageConfigs, + // ]); + break; + + case 'POST': + $request->validate([ + 'institution_name' => 'required|string|max:255', + 'department' => 'required|string|max:255', + 'about_presentation' => 'required|string', + ]); + + $user = auth()->user(); + + $user->updateOrCreateMeta("institution_name", $request->institution_name); + $user->updateOrCreateMeta("department", $request->department); + $user->updateOrCreateMeta("about_presentation", $request->about_presentation); + $user->updateOrCreateMeta("presentation_keywords", json_encode($request->presentation_keywords ?? [])); + + if ($request->has('is_published')) { + $user->updateOrCreateMeta("presentation_published_info", $request->presentation_published_info ?? ""); + } + + // Address + $user->updateOrCreateAddress("institution_address", [ + "street_name" => $request->street_name, + "city" => $request->city, + "state" => $request->state, + "postal_code" => $request->postal_code, + "country" => $request->country, + ]); + + $user->assignRole('presenter'); + + return redirect(route('user.account-pending')); + + break; + } + } +} diff --git a/backup/app/Http/Controllers@20230511/ActivityController.php b/backup/app/Http/Controllers@20230511/ActivityController.php new file mode 100644 index 0000000..bd04566 --- /dev/null +++ b/backup/app/Http/Controllers@20230511/ActivityController.php @@ -0,0 +1,152 @@ + User::orderBy('name', 'asc')->get(), + ]); + } + + /** + * Display a listing of the resource. + * + * @return \Illuminate\Http\Response + */ + public function index() + { + $breadcrumbs = [ + ['link' => "admin.home", 'name' => "Dashboard"], ['name' => 'User Activities'] + ]; + + $pageConfigs = [ + //'pageHeader' => false, + //'contentLayout' => "content-left-sidebar", + ]; + + $records = Activity::where('id', '!=', 0); + if (request()->ajax()) { + + if (request()->has('user_id') && !empty(request()->get('user_id'))) { + $records->where('activity_log.causer_id', request()->get('user_id')); + } + + + return Datatables::of($records) + ->editColumn('created_at', function ($row) { + return date("d M Y h:i A", strtotime($row->created_at)); + }) + ->editColumn('description', function ($row) { + if (!is_null($row->subject_type) && !empty($row->subject_type)) { + $arr = explode("\\", $row->subject_type); + $on = $arr[count($arr) - 1]; + $on = ucfirst($on); + } else { + $on = ''; + } + return ucfirst($row->description) . ' ' . $on; + }) + ->editColumn('ip_address', function ($row) { + return $row->ip_address ?? "N/A"; + }) + ->editColumn('properties', function($row) { + if($row->properties == "[]") { + return "N/A"; + } + $link = route('super-admin.user_activities.show', $row->id); + return ""; + }) + ->addColumn('user', function ($row) { + if( is_null($row->causer_id)) { + return "N/A"; + } + $user = User::where('id', $row->causer_id)->first(); + if($user) { + return $user->fullName(); + } + return "N/A"; + }) + ->rawColumns(['user', 'properties']) + ->make(true); + } else { + return view('content.activities.index', compact('breadcrumbs', 'pageConfigs')); + } + } + + /** + * Show the form for creating a new resource. + * + * @return \Illuminate\Http\Response + */ + public function create() + { + // + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function store(Request $request) + { + // + } + + /** + * Display the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function show($id) + { + $record = Activity::findOrFail($id); + dd( json_decode($record->properties, true) ); + return view('content.activities.show', compact('record')); + } + + /** + * Show the form for editing the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function edit($id) + { + // + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param int $id + * @return \Illuminate\Http\Response + */ + public function update(Request $request, $id) + { + // + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function destroy($id) + { + // + } +} diff --git a/backup/app/Http/Controllers@20230511/AdminController.php b/backup/app/Http/Controllers@20230511/AdminController.php new file mode 100644 index 0000000..7291acc --- /dev/null +++ b/backup/app/Http/Controllers@20230511/AdminController.php @@ -0,0 +1,161 @@ +count(); + $sum = $expenses->sum('amount'); + } + elseif(isset($_GET['search'])) + { + $expenses= Expense::search($_GET['search']); + $count = $expenses->count(); + $sum = $expenses->sum('amount'); + } + elseif(isset($_GET['start_date']) && isset($_GET['end_date'])) + { + $startdate = strtotime($_GET['start_date']); + $enddate = strtotime($_GET['end_date']); + + if ( $startdate == true && $enddate == true) { + $expenses = Expense::Datebetween($_GET['start_date'], $_GET['end_date']); + $count = $expenses->count(); + $sum = $expenses->sum('amount'); + } else { + return redirect()->route('payments.index')->with('error','Invalid Request'); + } + } + else + { + $expenses= Expense::simplepaginate(15); + $count = $expenses->count(); + $sum = $expenses->sum('amount'); + } + + return view('admins.index', compact('expenses','sum', 'count','id')); + } + + public function create() + { + $PaymentModes = PaymentMode::get(); + + return view('admins.expense', compact('PaymentModes')); + } + + public function store(Request $req) + { + $attributes= $req->validate([ + 'payee' =>'required|min:3|max:255', + 'amount' => 'required|gt:0', + 'comments' => 'nullable', + 'payment_modes_id' =>'required', + 'dateofpayment' => 'required|date', + ]); + + $expense=Expense::create([ + 'payee' => $attributes['payee'], + 'amount' => $attributes['amount'], + 'comments' => $attributes['comments'], + 'payment_modes_id' =>$attributes['payment_modes_id'], + 'dateofpayment' => Carbon::parse($attributes['dateofpayment'])->format('d-m-Y'), + ]); + + Activitylog::create([ + 'user_id' => Auth::user()->id, + 'action' => 'Created', + 'module_id' => 2, + 'module_item_id' => $expense->id + ]); + + return back()->with('success', 'Expenses Added Successfully'); + } + + + public function report(Request $request) + { + $month = $request->input('month'); + + $houses = House::whereHas('payments', function($query) use ($month) { + $query->where('billingmonth', $month); + })->get()->toArray(); + + return ['houses' => $houses]; + } + + + public function show(string $id) + { + // + } + + + public function edit(Expense $expense) + { + $PaymentModes = PaymentMode::get(); + + return view('admins.edit', compact('expense', 'PaymentModes')); + } + + public function update(Request $request, Expense $expense) + { + + $attributes= $request->validate([ + 'payee' =>'required|min:3|max:255', + 'amount' => 'required|gt:0', + 'comments' => 'nullable', + 'payment_modes_id' =>'required', + 'dateofpayment' => 'required|date', + ]); + + $expense->update([ + 'payee' => $attributes['payee'], + 'amount' => $attributes['amount'], + 'comments' => $attributes['comments'], + 'payment_modes_id' =>$attributes['payment_modes_id'], + 'dateofpayment' => Carbon::parse($attributes['dateofpayment'])->format('d-m-Y'), + ]); + + Activitylog::create([ + 'user_id' => Auth::user()->id, + 'action' => 'Updated', + 'module_id' => 2, + 'module_item_id' => $expense->id + ]); + + return redirect()->route('expenses.index')->with('success', 'Expenses Updated Successfully'); + } + + + public function destroy(Expense $expense) + { + abort_if(auth()->user()->usertype_id != User::ADMIN, 403, 'Access Deined'); + + Activitylog::create([ + 'user_id' => Auth::user()->id, + 'action' => 'Deleted', + 'module_id' => 2, + 'module_item_id' => $expense->id + ]); + + $expense->delete(); + + return back()->with('success','expense deleted successfully'); + } +} diff --git a/backup/app/Http/Controllers@20230511/AgoraRecordingController.php b/backup/app/Http/Controllers@20230511/AgoraRecordingController.php new file mode 100644 index 0000000..c29ed4c --- /dev/null +++ b/backup/app/Http/Controllers@20230511/AgoraRecordingController.php @@ -0,0 +1,113 @@ +token = $event->generateToken(); + + $uid = "123429836"; + + $uid = random_int(100000000, 999999999); + $uid = (string)$uid; + + $recording = new Recording(); + + // 1. Acquire Resource ID + $rid = $recording->acquire($event->channel_name, $uid); + + // 2. Start Recording + $r = $recording->start($event->channel_name, $uid, $event->token, $rid); + $rid = $r['resourceId'] ?? ""; + $sid = $r['sid'] ?? ""; + if( !empty($rid) && !empty($sid) ) { + // Save ResourceID, SID to database for finding recorded files later. + $eventRecording = EventRecording::create([ + 'event_id' => $event->id, + 'rid' => $r['resourceId'], + 'sid' => $r['sid'], + 'uid' => $uid, + 'status' => 'start', + ]); + return response()->json([ + 'success' => true, + 'body' => $r + ]); + } else { + + return response()->json([ + 'success' => false, + 'message' => $r + ]); + } + } + + public function status() + { + $recording = new Recording(); + $response = $recording->status( request()->get('rid'), request()->get('sid') ); + + $eventRecording = EventRecording::where([ + 'rid' => request()->get('rid'), + 'sid' => request()->get('sid'), + ])->first(); + + $eventRecording->file_lists = json_encode($response['serverResponse']); + $eventRecording->status = 'progress'; + $eventRecording->save(); + + return response()->json($response); + } + + public function stopRecording($id) + { + $event = Event::find($id); + + $eventRecording = EventRecording::where([ + 'rid' => request()->get('resourceId'), + 'sid' => request()->get('sid'), + 'event_id' => $event->id + ])->first(); + + $recording = new Recording(); + + $stopResponse = $recording->stop( + $event->channel_name, + $eventRecording->uid, + $eventRecording->rid, + $eventRecording->sid + ); + + $rid = $stopResponse['resourceId'] ?? ""; + $sid = $stopResponse['sid'] ?? ""; + if(!empty($rid) && !empty($sid) && isset($stopResponse['serverResponse'])) { + $eventRecording->file_lists = json_encode($stopResponse['serverResponse'] ?? null); + $eventRecording->status = 'stop'; + $eventRecording->save(); + + // Run save recording command. + \Artisan::call('event:save-recordings'); + } + return response()->json($stopResponse); + } + + public function saveRecordings() + { + \Artisan::call('event:save-recordings'); + echo \Artisan::output(); + } + +} diff --git a/backup/app/Http/Controllers@20230511/AppsController.php b/backup/app/Http/Controllers@20230511/AppsController.php new file mode 100644 index 0000000..595cf1a --- /dev/null +++ b/backup/app/Http/Controllers@20230511/AppsController.php @@ -0,0 +1,211 @@ + false]; + + return view('/content/apps/invoice/invoice-list', ['pageConfigs' => $pageConfigs]); + } + + // invoice preview App + public function invoice_preview() + { + $pageConfigs = ['pageHeader' => false]; + + return view('/content/apps/invoice/invoice-preview', ['pageConfigs' => $pageConfigs]); + } + + // invoice edit App + public function invoice_edit() + { + $pageConfigs = ['pageHeader' => false]; + + return view('/content/apps/invoice/invoice-edit', ['pageConfigs' => $pageConfigs]); + } + + // invoice edit App + public function invoice_add() + { + $pageConfigs = ['pageHeader' => false]; + + return view('/content/apps/invoice/invoice-add', ['pageConfigs' => $pageConfigs]); + } + + // invoice print App + public function invoice_print() + { + $pageConfigs = ['pageHeader' => false]; + + return view('/content/apps/invoice/invoice-print', ['pageConfigs' => $pageConfigs]); + } + + // User List Page + public function user_list() + { + $pageConfigs = ['pageHeader' => false]; + return view('/content/apps/user/app-user-list', ['pageConfigs' => $pageConfigs]); + } + + // User View Page + public function user_view() + { + $pageConfigs = ['pageHeader' => false]; + return view('/content/apps/user/app-user-view', ['pageConfigs' => $pageConfigs]); + } + + // User Edit Page + public function user_edit() + { + $pageConfigs = ['pageHeader' => false]; + return view('/content/apps/user/app-user-edit', ['pageConfigs' => $pageConfigs]); + } + + // Chat App + public function chatApp() + { + $pageConfigs = [ + 'pageHeader' => false, + 'contentLayout' => "content-left-sidebar", + 'pageClass' => 'chat-application', + ]; + + return view('/content/apps/chat/app-chat', [ + 'pageConfigs' => $pageConfigs + ]); + } + + // Calender App + public function calendarApp() + { + $pageConfigs = [ + 'pageHeader' => false + ]; + + return view('/content/apps/calendar/app-calendar', [ + 'pageConfigs' => $pageConfigs + ]); + } + + // Email App + public function emailApp() + { + $pageConfigs = [ + 'pageHeader' => false, + 'contentLayout' => "content-left-sidebar", + 'pageClass' => 'email-application', + ]; + + return view('/content/apps/email/app-email', ['pageConfigs' => $pageConfigs]); + } + // ToDo App + public function todoApp() + { + $pageConfigs = [ + 'pageHeader' => false, + 'contentLayout' => "content-left-sidebar", + 'pageClass' => 'todo-application', + ]; + + return view('/content/apps/todo/app-todo', [ + 'pageConfigs' => $pageConfigs + ]); + } + // File manager App + public function file_manager() + { + $pageConfigs = [ + 'pageHeader' => false, + 'contentLayout' => "content-left-sidebar", + 'pageClass' => 'file-manager-application', + ]; + + return view('/content/apps/fileManager/app-file-manager', ['pageConfigs' => $pageConfigs]); + } + + // Kanban App + public function kanbanApp() + { + $pageConfigs = [ + 'pageHeader' => false, + 'pageClass' => 'kanban-application', + ]; + + return view('/content/apps/kanban/app-kanban', ['pageConfigs' => $pageConfigs]); + } + + // Ecommerce Shop + public function ecommerce_shop() + { + $pageConfigs = [ + 'contentLayout' => "content-detached-left-sidebar", + 'pageClass' => 'ecommerce-application', + ]; + + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "eCommerce"], ['name' => "Shop"] + ]; + + return view('/content/apps/ecommerce/app-ecommerce-shop', [ + 'pageConfigs' => $pageConfigs, + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Ecommerce Details + public function ecommerce_details() + { + $pageConfigs = [ + 'pageClass' => 'ecommerce-application', + ]; + + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "eCommerce"], ['link' => "/app/ecommerce/shop", 'name' => "Shop"], ['name' => "Details"] + ]; + + return view('/content/apps/ecommerce/app-ecommerce-details', [ + 'pageConfigs' => $pageConfigs, + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Ecommerce Wish List + public function ecommerce_wishlist() + { + $pageConfigs = [ + 'pageClass' => 'ecommerce-application', + ]; + + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "eCommerce"], ['name' => "Wish List"] + ]; + + return view('/content/apps/ecommerce/app-ecommerce-wishlist', [ + 'pageConfigs' => $pageConfigs, + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Ecommerce Checkout + public function ecommerce_checkout() + { + $pageConfigs = [ + 'pageClass' => 'ecommerce-application', + ]; + + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "eCommerce"], ['name' => "Checkout"] + ]; + + return view('/content/apps/ecommerce/app-ecommerce-checkout', [ + 'pageConfigs' => $pageConfigs, + 'breadcrumbs' => $breadcrumbs + ]); + } +} diff --git a/backup/app/Http/Controllers@20230511/Auth/ConfirmPasswordController.php b/backup/app/Http/Controllers@20230511/Auth/ConfirmPasswordController.php new file mode 100644 index 0000000..9e93a1b --- /dev/null +++ b/backup/app/Http/Controllers@20230511/Auth/ConfirmPasswordController.php @@ -0,0 +1,40 @@ +middleware('auth'); + } +} diff --git a/backup/app/Http/Controllers@20230511/Auth/ForgotPasswordController.php b/backup/app/Http/Controllers@20230511/Auth/ForgotPasswordController.php new file mode 100644 index 0000000..c288267 --- /dev/null +++ b/backup/app/Http/Controllers@20230511/Auth/ForgotPasswordController.php @@ -0,0 +1,44 @@ +middleware('guest'); + } + + public function showLinkRequestForm(){ + $pageConfigs = [ + 'bodyClass' => "bg-full-screen-image", + 'blankPage' => true + ]; + + return view('/auth/passwords/email', [ + 'pageConfigs' => $pageConfigs + ]); + } +} diff --git a/backup/app/Http/Controllers@20230511/Auth/LoginController.php b/backup/app/Http/Controllers@20230511/Auth/LoginController.php new file mode 100644 index 0000000..58ae08c --- /dev/null +++ b/backup/app/Http/Controllers@20230511/Auth/LoginController.php @@ -0,0 +1,109 @@ +middleware('guest')->except('logout'); + } + + // Login + public function showLoginForm(){ + $pageConfigs = [ + 'bodyClass' => "bg-full-screen-image", + 'blankPage' => true + ]; + + return view('/auth/login', [ + 'pageConfigs' => $pageConfigs + ]); + } + + /** + * Log the user out of the application. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function logout(Request $request) + { + $this->guard()->logout(); + + $request->session()->invalidate(); + + return $this->loggedOut($request) ?: redirect('/login'); + } + + /** + * The user has been authenticated. + * + * @param \Illuminate\Http\Request $request + * @param mixed $user + * @return mixed + */ + protected function authenticated(Request $request, $user) + { + if($user->hasRole('presenter')) { + if(!$user->approved() || !$user->hasVerifiedEmail()) { + return redirect(route("user.account-pending")); + } + } + + + + } + + public function redirectTo() + { + if(auth()->user()->hasRole('super_admin')) { + return route('events.index'); + } + + if(auth()->user()->hasRole('admin')) { + return route('events.index'); + } + + if(auth()->user()->hasRole('subscriber') && auth()->user()->hasRole('presenter')) { + return route('home'); + } else if(auth()->user()->hasRole('presenter')) { + return route('presenter.events.index'); + } else { + return route('home'); + } + + } +} diff --git a/backup/app/Http/Controllers@20230511/Auth/RegisterController.php b/backup/app/Http/Controllers@20230511/Auth/RegisterController.php new file mode 100644 index 0000000..0a35801 --- /dev/null +++ b/backup/app/Http/Controllers@20230511/Auth/RegisterController.php @@ -0,0 +1,170 @@ +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', 'string', 'max:255'], + 'last_name' => ['required', 'string', 'max:255'], + 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], + 'password' => ['required', 'string', 'min:8', 'confirmed'], + ], [ + 'email.unique' => 'There is an account associated with this email address. Click Here to sign in.
After Sign in, you will get the option to become a subscriber.' + ]); + } + + /** + * Create a new user instance after a valid registration. + * + * @param array $data + * @return \App\User + */ + protected function create(array $data) + { + + return User::create([ + 'name' => $data['name'], + 'last_name' => $data['last_name'], + 'email' => $data['email'], + 'password' => Hash::make($data['password']), + ]); + } + + // Register + public function showRegistrationForm() + { + $pageConfigs = ['blankPage' => true]; + + return view('/auth/register', [ + 'pageConfigs' => $pageConfigs + ]); + } + + public function showRegistrationFormPresenter() + { + $pageConfigs = ['blankPage' => true]; + + return view('/auth/become-a-presenter', [ + 'pageConfigs' => $pageConfigs + ]); + } + + /** + * Handle a registration request for the application. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\RedirectResponse|\Illuminate\Http\JsonResponse + */ + public function registerPresenter(Request $request) + { + $request->validate([ + 'name' => ['required', 'string', 'max:255'], + 'last_name' => ['required', 'string', 'max:255'], + 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], + 'password' => ['required', 'string', 'min:8'], + 'institution_name' => 'required|string|max:255', + 'department' => 'required|string|max:255', + 'about_presentation' => 'required|string', + ], [ + 'email.unique' => 'There is an account associated with this email address. Click Here to sign in.' + ]); + + $user = new User; + $user->name = $request->name; + $user->last_name = $request->last_name; + $user->email = $request->email; + $user->password = Hash::make($request->password); + $user->save(); + + event(new Registered($user)); + + $user->updateOrCreateMeta("institution_name", $request->institution_name); + $user->updateOrCreateMeta("department", $request->department); + $user->updateOrCreateMeta("about_presentation", $request->about_presentation); + $user->updateOrCreateMeta("presentation_keywords", json_encode($request->presentation_keywords ?? [])); + + if($request->has('is_published')) { + $user->updateOrCreateMeta("presentation_published_info", $request->presentation_published_info ?? ""); + } + + // Address + $user->updateOrCreateAddress("institution_address", [ + "street_name" => $request->street_name, + "city" => $request->city, + "state" => $request->state, + "postal_code" => $request->postal_code, + "country" => $request->country, + ]); + + $user->syncRoles(['presenter']); + + $this->guard()->login($user); + + return redirect(route('home')); + + // return $request->wantsJson() + // ? new JsonResponse([], 201) + // : redirect($this->redirectPath()); + } + + /** + * The user has been registered. + * + * @param \Illuminate\Http\Request $request + * @param mixed $user + * @return mixed + */ + protected function registered(Request $request, $user) + { + $user->syncRoles(['subscriber']); + + } +} diff --git a/backup/app/Http/Controllers@20230511/Auth/ResetPasswordController.php b/backup/app/Http/Controllers@20230511/Auth/ResetPasswordController.php new file mode 100644 index 0000000..57992e5 --- /dev/null +++ b/backup/app/Http/Controllers@20230511/Auth/ResetPasswordController.php @@ -0,0 +1,52 @@ +middleware('guest'); + } + + public function showResetForm(Request $request, $token = null) + { + $pageConfigs = [ + 'bodyClass' => "bg-full-screen-image", + 'blankPage' => true + ]; + return view('auth.passwords.reset')->with( + ['token' => $token, 'email' => $request->email, 'pageConfigs' => $pageConfigs] + ); + } +} diff --git a/backup/app/Http/Controllers@20230511/Auth/VerificationController.php b/backup/app/Http/Controllers@20230511/Auth/VerificationController.php new file mode 100644 index 0000000..aea9617 --- /dev/null +++ b/backup/app/Http/Controllers@20230511/Auth/VerificationController.php @@ -0,0 +1,68 @@ +middleware('auth'); + $this->middleware('signed')->only('verify'); + $this->middleware('throttle:6,1')->only('verify', 'resend'); + } + + /** + * Show the email verification notice. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\RedirectResponse|\Illuminate\View\View + */ + public function show(Request $request) + { + $pageConfigs = [ + 'bodyClass' => "bg-full-screen-image", + 'blankPage' => true + ]; + return $request->user()->hasVerifiedEmail() + ? redirect($this->redirectPath()) + : view('auth.verify', compact('pageConfigs')); + } + + public function redirectTo() + { + if(auth()->user()->hasRole('subscriber') && !auth()->user()->subscribed('default')) { + return '/setup'; + } else { + return $this->redirectTo; + } + } +} diff --git a/backup/app/Http/Controllers@20230511/AuthController.php b/backup/app/Http/Controllers@20230511/AuthController.php new file mode 100644 index 0000000..26c5509 --- /dev/null +++ b/backup/app/Http/Controllers@20230511/AuthController.php @@ -0,0 +1,104 @@ +validate([ + 'name' => 'required|string', + 'email' => 'required|string|email|unique:users', + 'password' => 'required|string|', + 'c_password' => 'required|same:password', + ]); + + $user = new User([ + 'name' => $request->name, + 'email' => $request->email, + 'password' => bcrypt($request->password) + ]); + if ($user->save()) { + return response()->json([ + 'message' => 'Successfully created user!' + ], 201); + } else { + return response()->json(['error' => 'Provide proper details']); + } + } + + /** + * Login user and create token + * + * @param [string] email + * @param [string] password + * @param [boolean] remember_me + * @return [string] access_token + * @return [string] token_type + * @return [string] expires_at + */ + public function login(Request $request) + { + $request->validate([ + 'email' => 'required|string|email', + 'password' => 'required|string', + 'remember_me' => 'boolean' + ]); + $credentials = request(['email', 'password']); + if (!Auth::attempt($credentials)) + return response()->json([ + 'message' => 'Unauthorized' + ], 401); + $user = $request->user(); + $tokenResult = $user->createToken('Personal Access Token'); + $token = $tokenResult->token; + if ($request->remember_me) + $token->expires_at = Carbon::now()->addWeeks(1); + $token->save(); + return response()->json([ + 'access_token' => $tokenResult->accessToken, + 'token_type' => 'Bearer', + 'expires_at' => Carbon::parse( + $tokenResult->token->expires_at + )->toDateTimeString() + ]); + } + + /** + * Logout user (Revoke the token) + * + * @return [string] message + */ + public function logout(Request $request) + { + $request->user()->token()->revoke(); + return response()->json([ + 'message' => 'Successfully logged out' + ]); + } + + /** + * Get the authenticated User + * + * @return [json] user object + */ + public function user(Request $request) + { + return response()->json($request->user()); + } +} diff --git a/backup/app/Http/Controllers@20230511/AuthenticationController.php b/backup/app/Http/Controllers@20230511/AuthenticationController.php new file mode 100644 index 0000000..76236c5 --- /dev/null +++ b/backup/app/Http/Controllers@20230511/AuthenticationController.php @@ -0,0 +1,72 @@ + true]; + + return view('/content/authentication/auth-login-v1', ['pageConfigs' => $pageConfigs]); + } + + // Login v2 + public function login_v2() + { + $pageConfigs = ['blankPage' => true]; + + return view('/content/authentication/auth-login-v2', ['pageConfigs' => $pageConfigs]); + } + + // Register v1 + public function register_v1() + { + $pageConfigs = ['blankPage' => true]; + + return view('/content/authentication/auth-register-v1', ['pageConfigs' => $pageConfigs]); + } + + // Register v2 + public function register_v2() + { + $pageConfigs = ['blankPage' => true]; + + return view('/content/authentication/auth-register-v2', ['pageConfigs' => $pageConfigs]); + } + + // Forgot Password v1 + public function forgot_password_v1() + { + $pageConfigs = ['blankPage' => true]; + + return view('/content/authentication/auth-forgot-password-v1', ['pageConfigs' => $pageConfigs]); + } + + // Forgot Password v2 + public function forgot_password_v2() + { + $pageConfigs = ['blankPage' => true]; + + return view('/content/authentication/auth-forgot-password-v2', ['pageConfigs' => $pageConfigs]); + } + + // Reset Password + public function reset_password_v1() + { + $pageConfigs = ['blankPage' => true]; + + return view('/content/authentication/auth-reset-password-v1', ['pageConfigs' => $pageConfigs]); + } + + // Reset Password + public function reset_password_v2() + { + $pageConfigs = ['blankPage' => true]; + + return view('/content/authentication/auth-reset-password-v2', ['pageConfigs' => $pageConfigs]); + } +} diff --git a/backup/app/Http/Controllers@20230511/CardsController.php b/backup/app/Http/Controllers@20230511/CardsController.php new file mode 100644 index 0000000..4df085e --- /dev/null +++ b/backup/app/Http/Controllers@20230511/CardsController.php @@ -0,0 +1,63 @@ + "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Card"], ['name' => "Basic Card"] + ]; + return view('/content/cards/card-basic', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Card Advance + public function card_advance() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Card"], ['name' => "Advance Card"] + ]; + return view('/content/cards/card-advance', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Card Statistics + public function card_statistics() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Card"], ['name' => "Statistics Cards"] + ]; + return view('/content/cards/card-statistics', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Card Analytics + public function card_analytics() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Card"], ['name' => "Analytics Cards"] + ]; + return view('/content/cards/card-analytics', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Card Actions + public function card_actions() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Card"], ['name' => "Card Actions"] + ]; + return view('/content/cards/card-actions', [ + 'breadcrumbs' => $breadcrumbs + ]); + } +} diff --git a/backup/app/Http/Controllers@20230511/ChartsController.php b/backup/app/Http/Controllers@20230511/ChartsController.php new file mode 100644 index 0000000..b018819 --- /dev/null +++ b/backup/app/Http/Controllers@20230511/ChartsController.php @@ -0,0 +1,41 @@ + "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Charts & Maps"], ['name' => "Apex"] + ]; + return view('/content/charts-maps/chart-apex', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Chartjs Charts + public function chartjs() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Charts & Maps"], ['name' => "Chartjs"] + ]; + return view('/content/charts-maps/chart-chartjs', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Google Maps + public function maps_leaflet() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Maps"], ['name' => "Leaflet Maps"] + ]; + return view('/content/charts-maps/maps-leaflet', [ + 'breadcrumbs' => $breadcrumbs + ]); + } +} diff --git a/backup/app/Http/Controllers@20230511/ComponentsController.php b/backup/app/Http/Controllers@20230511/ComponentsController.php new file mode 100644 index 0000000..0e7ddcc --- /dev/null +++ b/backup/app/Http/Controllers@20230511/ComponentsController.php @@ -0,0 +1,262 @@ + "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Alerts"] + ]; + return view('/content/components/component-alert', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component - Avatar + public function avatar() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Avatar"] + ]; + return view('/content/components/component-avatar', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Badges + public function badges() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Badges"] + ]; + return view('/content/components/component-badges', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Breadcrumbs + public function breadcrumbs() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Breadcrumbs"] + ]; + return view('/content/components/component-breadcrumbs', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Buttons + public function buttons() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Buttons"] + ]; + return view('/content/components/component-buttons', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Carousel + public function carousel() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Carousel"] + ]; + return view('/content/components/component-carousel', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Collapse + public function collapse() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Collapse"] + ]; + return view('/content/components/component-collapse', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component - Divider + public function divider() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Divider"] + ]; + return view('/content/components/component-divider', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Dropdowns + public function dropdowns() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Dropdowns"] + ]; + return view('/content/components/component-dropdowns', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component List Group + public function list_group() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "List Group"] + ]; + return view('/content/components/component-list-group', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Media Objects + public function media_objects() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Media Objects"] + ]; + return view('/content/components/component-media-objects', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Modals + public function modals() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Modals"] + ]; + return view('/content/components/component-modals', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Navs + public function navs() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Navs"] + ]; + return view('/content/components/component-navs', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Pagination + public function pagination() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Pagination"] + ]; + return view('/content/components/component-pagination', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Pill Badges + public function pill_badges() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Pill Badges"] + ]; + return view('/content/components/component-pill-badges', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Pills + public function pills() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Pills"] + ]; + return view('/content/components/component-pills', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Tabs + public function tabs() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Tabs"] + ]; + return view('/content/components/component-tabs', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + + // Component Tooltips + public function tooltips() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Tooltips"] + ]; + return view('/content/components/component-tooltips', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Popovers + public function popovers() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Popovers"] + ]; + return view('/content/components/component-popovers', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Progress + public function progress() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Progress"] + ]; + return view('/content/components/component-progress', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Spinner + public function spinner() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Spinner"] + ]; + return view('/content/components/component-spinner', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Timeline + public function timeline() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Timeline"] + ]; + return view('/content/components/component-timeline', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Component Toast + public function toast() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Components"], ['name' => "Toast"] + ]; + return view('/content/components/component-toast', [ + 'breadcrumbs' => $breadcrumbs + ]); + } +} diff --git a/backup/app/Http/Controllers@20230511/Controller.php b/backup/app/Http/Controllers@20230511/Controller.php new file mode 100644 index 0000000..77ec359 --- /dev/null +++ b/backup/app/Http/Controllers@20230511/Controller.php @@ -0,0 +1,12 @@ +get('cp_img_path') != NULL ) { + $image = public_path("uploads/profile_pic/{$guard}/" . request()->get('cp_img_path'));// $_POST['cp_img_path'] = /assets/uploads/img_name.ext + $imgr->load($image); + + $imgX = intval($_POST['ic_x']); + $imgY = intval($_POST['ic_y']); + $imgW = intval($_POST['ic_w']); + $imgH = intval($_POST['ic_h']); + + $imgr->resize($imgW,$imgH,$imgX,$imgY); + + $imgr->save($image); + $record = auth($guard)->user(); + $record->profile_photo_path = request()->get('cp_img_path'); + $record->save(); + + echo 'get('cp_img_path') ) .'?t='.time().'" class="rounded mr-50" alt="profile image" height="80" + width="80"/>'; + } + + + } + + function uploadImage(Request $request, $guard) + { + + $id = Auth::guard($guard)->user()->id; + $validator = Validator::make( + $request->all(), + ['file' => 'required|image|mimes:jpeg,png,jpg,png,ico|max:2048'], + [ + 'file.mimes' => 'Only jpg, jpeg, png files are allowed', + 'file.max' => 'Image size must be less than 2MB.' + ] + ); + + if ($validator->fails()) { + echo "
You have following errors:
"; + echo "
"; + foreach($validator->errors()->all() as $error) { + echo "

" . $error . "

"; + } + echo "
"; + exit; + return response()->json([ + 'success' => false, + 'error' => $validator->errors()->all() + ]); + } + + $fileName = "{$guard}_" . $id . "_" . time() . "." . $request->file('file')->getClientOriginalExtension(); + + + $request->file('file')->move(public_path('uploads/profile_pic/' . $guard), $fileName); + echo '
'; + exit; + + } +} + + +class imageResizing +{ + + var $image; + var $image_type; + var $res; + + function load($filename) + { + + $image_info = getimagesize($filename); + + $this->image_type = $image_info[2]; + + if ($this->image_type == IMAGETYPE_JPEG) { + $this->image = imagecreatefromjpeg($filename); + $this->res = ".jpg"; + } elseif ($this->image_type == IMAGETYPE_GIF) { + $this->image = imagecreatefromgif($filename); + $this->res = ".gif"; + } elseif ($this->image_type == IMAGETYPE_PNG) { + $this->image = imagecreatefrompng($filename); + $this->res = ".png"; + } + } + + function save($filename, $image_type = IMAGETYPE_JPEG, $compression = 100, $permissions = null) + { + + if ($image_type == IMAGETYPE_JPEG) + imagejpeg($this->image, $filename, $compression); + + elseif ($image_type == IMAGETYPE_GIF) + imagegif($this->image, $filename); + + elseif ($image_type == IMAGETYPE_PNG) + imagepng($this->image, $filename); + + if ($permissions != null) + chmod($filename, $permissions); + } + + function output($image_type = IMAGETYPE_JPEG) + { + + if ($image_type == IMAGETYPE_JPEG) + imagejpeg($this->image); + + elseif ($image_type == IMAGETYPE_GIF) + imagegif($this->image); + + elseif ($image_type == IMAGETYPE_PNG) + imagepng($this->image); + } + + function getWidth() + { + return imagesx($this->image); + } + + function getHeight() + { + return imagesy($this->image); + } + + function resizeToHeight($height) + { + + $ratio = $height / $this->getHeight(); + + $width = $this->getWidth() * $ratio; + + $this->resize($width, $height); + } + function resizeToWidth($width) + { + + $ratio = $width / $this->getWidth(); + + $height = $this->getheight() * $ratio; + + $this->resize($width, $height); + } + function scale($scale) + { + + $width = $this->getWidth() * $scale / 100; + + $height = $this->getheight() * $scale / 100; + + $this->resize($width, $height); + } + function resize($width, $height, $x = 0, $y = 0) + { + + $new_image = imagecreatetruecolor($width, $height); + + //imagecopyresampled($new_image, $this->image, $x, $y, 0, 0, $width, $height, $this->getWidth(), $this->getHeight()); + imagecopy($new_image, $this->image, 0, 0, $x, $y, $width, $height); + /* + echo $x."
"; + echo $y."
"; + echo $width."
"; + echo $height."
"; + echo $this->getWidth()."
"; + echo $this->getHeight();*/ + + $this->image = $new_image; + } +} diff --git a/backup/app/Http/Controllers@20230511/DashboardController.php b/backup/app/Http/Controllers@20230511/DashboardController.php new file mode 100644 index 0000000..e0f258f --- /dev/null +++ b/backup/app/Http/Controllers@20230511/DashboardController.php @@ -0,0 +1,85 @@ + false]; + + $stats['admins_count'] = User::role('admin')->count(); + $stats['presenters_count'] = User::role('presenter')->count(); + $stats['subscribers_count'] = User::role('subscriber')->count(); + $stats['events_count'] = Event::count(); + $stats['videos_count'] = Video::count(); + + return view('/content/dashboard/super_admin', ['pageConfigs' => $pageConfigs, 'stats' => $stats]); + } + + public function admin() + { + $pageConfigs = ['pageHeader' => false]; + + $stats['admins_count'] = User::role('admin')->count(); + $stats['presenters_count'] = User::role('presenter')->count(); + $stats['subscribers_count'] = User::role('subscriber')->count(); + $stats['events_count'] = Event::count(); + $stats['videos_count'] = Video::count(); + + return view('/content/dashboard/admin', ['pageConfigs' => $pageConfigs, 'stats' => $stats]); + } + + public function presenter() + { + + } + + + public function index() + { + $pageConfigs = [ + 'pageHeader' => false, + 'showMenu' => false, + 'mainLayoutType' => 'subscriber' + ]; + + if ( + ( auth()->user()->hasRole('presenter') && auth()->user()->hasRole('subscriber') ) + || + auth()->user()->hasRole('subscriber') + || + auth()->user()->hasRole('super_admin') + || + auth()->user()->hasRole('admin') + ) { + + $events = Event::where('status', 'publish') + ->orderBy('start_date_time', 'asc') + // ->where('start_date_time', '>=', date('Y-m-d H:i:s')) + ->limit(6)->get(); + + $videos = Video::where('status', 'publish') + ->limit(8)->get(); + + return view('/content/dashboard/subscriber', [ + 'pageConfigs' => $pageConfigs, 'mainLayoutType' => 'subscriber', + 'events' => $events, + 'videos' => $videos + ]); + } else if (auth()->user()->hasRole('presenter')) { + + return redirect(route('presenter.events.index')); + + } else { + + abort(403, "Access Denied"); + + } + } +} diff --git a/backup/app/Http/Controllers@20230511/EventController.php b/backup/app/Http/Controllers@20230511/EventController.php new file mode 100644 index 0000000..b400aff --- /dev/null +++ b/backup/app/Http/Controllers@20230511/EventController.php @@ -0,0 +1,445 @@ +where('is_active', 1)->get()); + View::share('presenters', User::role(Helper::PRESENTER_ROLE)->where('profile_status', 'approved')->where('is_active', 1)->get()); + View::share('keywords', Keyword::all()); + } + + /** + * Display a listing of the resource. + * + * @return \Illuminate\Http\Response + */ + public function index() + { + + if (request()->ajax()) { + + if (auth()->user()->hasRole('super_admin')) { + $events = Event::with('user')->where('events.id', '<>', 0); + if (request()->get('view') == 'trash') { + $events->onlyTrashed(); + } + } else { + + if (request()->get('view') == 'trash') { + $events = Event::onlyTrashed()->leftJoin('event_user', 'event_user.event_id', '=', 'events.id') + ->where(function($query) { + $query->where('event_user.user_id', auth()->user()->id); + $query->orWhere('events.user_id', auth()->user()->id); + }); + + } else { + $events = Event::leftJoin('event_user', 'event_user.event_id', '=', 'events.id') + ->where(function($query) { + $query->where('event_user.user_id', auth()->user()->id); + $query->orWhere('events.user_id', auth()->user()->id); + }); + // ->where('event_user.user_id', auth()->user()->id) + // ->orWhere('events.user_id', auth()->user()->id); + } + + } + + + + if (request()->get('event_admin') != "") { + $events->where('user_id', request()->get('event_admin')); + } + + if (request()->get('event_status') != "") { + $events->where('status', request()->get('event_status')); + } + + + if (request()->get('view') == 'calendar') { + // Return data for Calendar + if (auth()->user()->hasRole('super_admin')) { + return Event::where('id', '<>', 0)->select('events.*', 'start_date_time as start')->get()->toJson(); + } else { + return Event::leftJoin('event_user', 'event_user.event_id', '=', 'events.id') + ->where('event_user.user_id', auth()->user()->id) + ->orWhere('events.user_id', auth()->user()->id) + ->select('events.*', 'events.start_date_time as start') + ->get()->toJson(); + } + } + + return datatables()->of($events) + ->editColumn('title', function ($event) { + $title = Helper::tooltip($event->title, 50); + $eventLink = route('subscriber.events.show', $event->id); + return "$title "; + }) + ->editColumn('created_at', function ($event) { + return Timezone::convertToLocal($event->created_at, 'd M Y'); + }) + ->editColumn('status', function ($event) { + return $event->statusHtml(); + }) + ->editColumn('start_date_time', function ($event) { + return Timezone::convertToLocal($event->start_date_time, 'd M Y h:i A'); + }) + ->addColumn('users', function ($event) { + if (isset($event->user->id)) { + if (auth()->user()->id == $event->user->id) { + return "Me"; + } else { + $user = $event->user; + return $event->user->fullName() . "
" . "{$user->email}"; + } + } else { + return "N/A"; + } + }) + ->addColumn('last_name', function($event) { + if(!isset($event->user->id)) { return "N/A"; } + return $event->user->last_name; + }) + ->addColumn('email', function($event) { + if(!isset($event->user->id)) { return "N/A"; } + return $event->user->email; + }) + ->addColumn('action', function ($event) { + $deleteUrl = route('events.destroy', $event->id); + + if ($event->trashed()) { + $url = route('events.restore', $event->id); + + return " + + + + + + "; + } else { + $url = route('events.edit', $event->id); + $liveUrl = route('live.event.index', $event->id); + + return " + + + + + Go Live + "; + } + }) + ->rawColumns(['action', 'is_active', 'users', 'status', 'title']) + ->make(true); + } else { + + $pageConfigs = ['pageHeader' => true]; + $breadcrumbs = [ + ['link' => "/", 'name' => "Dashboard"], + ['name' => "Events"] + ]; + return view('/content/events/manage/index', compact('breadcrumbs')); + } + } + + /** + * Show the form for creating a new resource. + * + * @return \Illuminate\Http\Response + */ + public function create() + { + return view('/content/events/manage/create'); + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function store(Request $request) + { + $request->validate($this->validationRules()); + + $event = new Event; + $event->user_id = auth()->user()->hasRole('super_admin') ? $request->user_id : auth()->user()->id; + $event->title = $request->title; + $event->start_date_time = Timezone::convertFromLocal($request->start_date_time); + $channelName = Str::slug($request->title, '-'); + $channelName = Str::limit($channelName, 10) . '_' . date('d_M_Y_H_i_s'); + $event->channel_name = $channelName; + $event->status = $request->status; + $event->save(); + + $event->users()->sync($request->users ?? []); + + $keywordIds = []; + + foreach($request->keywords as $keywordId) { + if(!is_numeric($keywordId)) { + $keyword = Keyword::create([ + 'keyword_name' => $keywordId, + ]); + $keywordId = $keyword->id; + } + + $keywordIds[] = $keywordId; + } + + $event->keywords()->sync($keywordIds ?? []); + + if ($request->hasFile('logo')) { + try { + $path = $request->file('logo')->store('public/event_images'); + $fileName = $request->file('logo')->getClientOriginalName(); + $extension = $request->file('logo')->extension(); + $file = new File; + $file->title = $fileName; + $file->location = $path; + $file->extension = $extension; + $file->save(); + + $event->logo_id = $file->id; + $event->save(); + } catch (\Exception $e) {} + } + + foreach($event->users ?? [] as $user) { + $user = User::find($user->id); + + try { + $user->notifyAt( + new PresenterEventReminder($event, $user), + Carbon::parse(Timezone::convertFromLocal($event->start_date_time)) + ); + } catch(\Exception $e) { + // Send date may be in advance. + } + + } + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Event created successfully.' + ]); + } + + /** + * Display the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function show($id) + { + $record = Event::findOrFail($id); + $record->start_date_time = Timezone::convertToLocal($record->start_date_time, 'd M Y h:i A'); + $record->token = $record->generateToken(); + return view('/content/events/manage/show', compact('record')); + } + + /** + * Show the form for editing the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function edit($id) + { + $record = Event::findOrFail($id); + $record->start_date_time = Timezone::convertToLocal($record->start_date_time, 'd M Y h:i A'); + return view('/content/events/manage/edit', compact('record')); + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param int $id + * @return \Illuminate\Http\Response + */ + public function update(Request $request, $id) + { + $event = Event::findOrFail($id); + $request->validate($this->validationRules([ + 'title' => 'required|max:255|unique:events,title,' . $id, + ])); + + $event->user_id = auth()->user()->hasRole('super_admin') ? $request->user_id : auth()->user()->id; + $event->title = $request->title; + $event->start_date_time = Timezone::convertFromLocal($request->start_date_time); + $event->status = $request->status; + $event->save(); + + + $keywordIds = []; + + foreach($request->keywords as $keywordId) { + if(!is_numeric($keywordId)) { + $keyword = Keyword::create([ + 'keyword_name' => $keywordId, + ]); + $keywordId = $keyword->id; + } + + $keywordIds[] = $keywordId; + } + + $event->keywords()->sync($keywordIds ?? []); + + if ($request->hasFile('logo')) { + $event->addOrUpdateLogo($request->file('logo')); + } + + foreach($event->users ?? [] as $user) { + $user = User::find($user->id); + + $record = ScheduledNotification::where( + 'notification', + Serializer::create()->serializeNotifiable(new PresenterEventReminder($event, $user)) + )->where([ + 'target_id' => $user->id, + 'target_type' => 'App\User' + ])->first(); + + if($record) { + $record->delete(); + } + } + + $event->users()->sync($request->users ?? []); + + foreach($event->users ?? [] as $user) { + $user = User::find($user->id); + + try { + $user->notifyAt( + new PresenterEventReminder($event, $user), + Carbon::parse(Timezone::convertFromLocal($event->start_date_time)) + ); + } catch(\Exception $e) { + // Send date may be in advance. + } + } + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Event information updated successfully.' + ]); + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function destroy($id) + { + $record = Event::withTrashed()->findOrFail($id); + if ($record->trashed()) { + if ($record->logo_id) { + $logo = File::find($record->logo_id); + $logoLocation = $logo->location; + } else { + $logoLocation = ""; + } + + $record->forceDelete(); + + if (!empty($logoLocation)) { + // Storage::delete($logoLocation); + $logo->delete(); + } + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Event permanently deleted successfully.' + ]); + } else { + $record->delete(); + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Event moved to trash successfully.' + ]); + } + } + + public function restore($id) + { + $record = Event::withTrashed()->findOrFail($id); + if ($record->trashed()) { + $record->restore(); + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Event restored successfully.' + ]); + } else { + return response()->json([ + 'message' => 'Not found' + ], 404); + } + } + + public function validationRules($overrideRule = []) + { + $rules = [ + 'title' => 'required|max:255|unique:events,title', + 'start_date_time' => 'required', + 'status' => 'required|in:' . implode(',', array_keys(config('setting.event_status'))), + 'logo' => 'image|nullable|max:5120' + ]; + return array_merge($rules, $overrideRule); + } +} diff --git a/backup/app/Http/Controllers@20230511/EventRecordingController.php b/backup/app/Http/Controllers@20230511/EventRecordingController.php new file mode 100644 index 0000000..9a88c8d --- /dev/null +++ b/backup/app/Http/Controllers@20230511/EventRecordingController.php @@ -0,0 +1,85 @@ + "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Extensions"], ['name' => "Sweet Alerts"] + ]; + return view('/content/extensions/ext-component-sweet-alerts', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // block ui + public function block_ui() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Extensions"], ['name' => "BlockUI"] + ]; + return view('/content/extensions/ext-component-block-ui', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Toastr + public function toastr() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Extensions"], ['name' => "Toastr"] + ]; + return view('/content/extensions/ext-component-toastr', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // NoUi Slider + public function slider() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Extensions"], ['name' => "Sliders"] + ]; + return view('/content/extensions/ext-component-slider', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Drag Drop + public function drag_drop() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Extensions"], ['name' => "Drag & Drop"] + ]; + return view('/content/extensions/ext-component-drag-drop', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Tour + public function tour() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Extensions"], ['name' => "Tour"] + ]; + return view('/content/extensions/ext-component-tour', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Clipboard + public function clipboard() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Extensions"], ['name' => "Clipboard"] + ]; + return view('/content/extensions/ext-component-clipboard', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Media Player + public function plyr() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Extensions"], ['name' => "Media Player"] + ]; + return view('/content/extensions/ext-component-media-player', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Context Menu + public function context_menu() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Extensions"], ['name' => "Context Menu"] + ]; + return view('/content/extensions/ext-component-context-menu', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // swiper + public function swiper() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Extensions"], ['name' => "Swiper"] + ]; + return view('/content/extensions/ext-component-swiper', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // tree + public function tree() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Extensions"], ['name' => "Tree"] + ]; + return view('/content/extensions/ext-component-tree', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // ratings + public function ratings() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Extensions"], ['name' => "Ratings"] + ]; + return view('/content/extensions/ext-component-ratings', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // I18n + public function locale() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Extensions"], ['name' => "Locale"] + ]; + return view('/content/locale/locale', [ + 'breadcrumbs' => $breadcrumbs + ]); + } +} diff --git a/backup/app/Http/Controllers@20230511/FormsController.php b/backup/app/Http/Controllers@20230511/FormsController.php new file mode 100644 index 0000000..b7ac41a --- /dev/null +++ b/backup/app/Http/Controllers@20230511/FormsController.php @@ -0,0 +1,185 @@ + "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Form Elements"], ['name' => "Input"] + ]; + return view('/content/forms/form-elements/form-input', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Form Elements - Input-groups + public function input_groups() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Form Elements"], ['name' => "Input Groups"] + ]; + return view('/content/forms/form-elements/form-input-groups', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Form Elements - Input-mask + public function input_mask() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Form Elements"], ['name' => "Input Mask"] + ]; + return view('/content/forms/form-elements/form-input-mask', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Form Elements - Textarea + public function textarea() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Form Elements"], ['name' => "Textarea"] + ]; + return view('/content/forms/form-elements/form-textarea', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Form Elements - Checkbox + public function checkbox() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Form Elements"], ['name' => "Checkbox"] + ]; + return view('/content/forms/form-elements/form-checkbox', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Form Elements - Radio + public function radio() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Form Elements"], ['name' => "Radio"] + ]; + return view('/content/forms/form-elements/form-radio', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Form Elements - Switch + public function switch() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Form Elements"], ['name' => "Switch"] + ]; + return view('/content/forms/form-elements/form-switch', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Form Elements - Select + public function select() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Form Elements"], ['name' => "Select"] + ]; + return view('/content/forms/form-elements/form-select', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + + + // Form Elements - Number Input + public function number_input() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Form Elements"], ['name' => "Number Input"] + ]; + return view('/content/forms/form-elements/form-number-input', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // File Uploader + public function file_uploader() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Form Elements"], ['name' => "File Uploader"] + ]; + return view('/content/forms/form-elements/form-file-uploader', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Quill Editor + public function quill_editor() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Form Elements"], ['name' => "Quill Editor"] + ]; + return view('/content/forms/form-elements/form-quill-editor', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Form Elements - Date & time Picker + public function date_time_picker() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Form Elements"], ['name' => "Date & Time Picker"] + ]; + return view('/content/forms/form-elements/form-date-time-picker', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Form Layouts + public function layouts() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Forms"], ['name' => "Form Layouts"] + ]; + return view('/content/forms/form-layout', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Form Wizard + public function wizard() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Forms"], ['name' => "Form Wizard"] + ]; + return view('/content/forms/form-wizard', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Form Validation + public function validation() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Forms"], ['name' => "Form Validation"] + ]; + return view('/content/forms/form-validation', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + // Form repeater + public function form_repeater() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Forms"], ['name' => "Form Repeater"] + ]; + return view('/content/forms/form-repeater', [ + 'breadcrumbs' => $breadcrumbs + ]); + } +} diff --git a/backup/app/Http/Controllers@20230511/HouseController.php b/backup/app/Http/Controllers@20230511/HouseController.php new file mode 100644 index 0000000..0b74ca6 --- /dev/null +++ b/backup/app/Http/Controllers@20230511/HouseController.php @@ -0,0 +1,77 @@ +id)->where('isOwner',true)->pluck('user_id'); + + $owner= User::find($owner)->first(); + + $tenant= Resident::where('house_id',$house->id)->where('isOwner',false)->pluck('user_id'); + + $tenants= User::find($tenant); + + $payments= Payment::where('house_id',$house->id)->get(); + + $next = House::where('id','>',$house->id)->orderby('id','asc')->first(); + + $previous = House::where('id','<',$house->id)->orderby('id','desc')->first(); + + $maxCount = House::orderby('id','desc')->first()->id; + + return view('houses.detail', compact('owner','tenants', 'payments', 'house', 'next', 'previous', 'maxCount')); + } + + + public function edit(string $id) + { + // + } + + + public function update(Request $request, string $id) + { + // + } + + + public function destroy(string $id) + { + // + } +} diff --git a/backup/app/Http/Controllers@20230511/KeywordController.php b/backup/app/Http/Controllers@20230511/KeywordController.php new file mode 100644 index 0000000..77dd903 --- /dev/null +++ b/backup/app/Http/Controllers@20230511/KeywordController.php @@ -0,0 +1,84 @@ +'en', 'fr'=>'fr','de'=>'de','pt'=>'pt']; + // check for existing language + if(array_key_exists($locale,$availLocale)){ + session()->put('locale',$locale); + } + return redirect()->back(); + } +} diff --git a/backup/app/Http/Controllers@20230511/LiveEventController.php b/backup/app/Http/Controllers@20230511/LiveEventController.php new file mode 100644 index 0000000..178b0c6 --- /dev/null +++ b/backup/app/Http/Controllers@20230511/LiveEventController.php @@ -0,0 +1,33 @@ + 'boxed', + 'pageHeader' => false, + 'showMenu' => false, + 'verticalMenuNavbarType' => 'hidden', + 'pageClass' => 'chat-application', + 'footerType' => 'hidden' + // 'contentLayout' => "content-left-sidebar", + ]; + + if(auth()->user()->hasRole('presenter')) [ + $pageConfigs['mainLayoutType'] = 'subscriber' + ]; + + $event->token = $event->generateToken(); + return view('content/live/index', compact('event', 'pageConfigs')); + } +} diff --git a/backup/app/Http/Controllers@20230511/LoginController.php b/backup/app/Http/Controllers@20230511/LoginController.php new file mode 100644 index 0000000..2e1e6df --- /dev/null +++ b/backup/app/Http/Controllers@20230511/LoginController.php @@ -0,0 +1,31 @@ +only('mobile1', 'password'); + + if (Auth::attempt($credentials)) + { + return redirect('/'); + } + return redirect('/')->with('error','Incorrect Password' ); + } + + public function logout(Request $request) + { + + $request->session()->put('logged_out', true); + + Auth::logout(); + + return redirect('/'); + } +} diff --git a/backup/app/Http/Controllers@20230511/MiscellaneousController.php b/backup/app/Http/Controllers@20230511/MiscellaneousController.php new file mode 100644 index 0000000..2244c64 --- /dev/null +++ b/backup/app/Http/Controllers@20230511/MiscellaneousController.php @@ -0,0 +1,42 @@ + true]; + + return view('/content/miscellaneous/page-coming-soon', ['pageConfigs' => $pageConfigs]); + } + + // Error + public function error() + { + $pageConfigs = ['blankPage' => true]; + + return view('/content/miscellaneous/error', ['pageConfigs' => $pageConfigs]); + } + + // Not-authorized + public function not_authorized() + { + $pageConfigs = ['blankPage' => true]; + + return view('/content/miscellaneous/page-not-authorized', ['pageConfigs' => $pageConfigs]); + } + + // Maintenance + public function maintenance() + { + $pageConfigs = ['blankPage' => true]; + + return view('/content/miscellaneous/page-maintenance', [ + 'pageConfigs' => $pageConfigs + ]); + } +} diff --git a/backup/app/Http/Controllers@20230511/PageLayoutController.php b/backup/app/Http/Controllers@20230511/PageLayoutController.php new file mode 100644 index 0000000..3a18256 --- /dev/null +++ b/backup/app/Http/Controllers@20230511/PageLayoutController.php @@ -0,0 +1,45 @@ + true]; + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Layouts"], ['name' => "Collapsed menu"]]; + return view('/content/page-layouts/layout-collapsed-menu', ['pageConfigs' => $pageConfigs, 'breadcrumbs' => $breadcrumbs]); + } + + // Boxed Layout + public function layout_boxed() + { + $pageConfigs = ['layoutWidth' => 'boxed']; + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Layouts"], ['name' => "Layout Boxed"]]; + return view('/content/page-layouts/layout-boxed', ['pageConfigs' => $pageConfigs, 'breadcrumbs' => $breadcrumbs]); + } + // Layout Without Menu + public function layout_without_menu() + { + $pageConfigs = ['showMenu' => false]; + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Layouts"], ['name' => "Layout without menu"]]; + return view('/content/page-layouts/layout-without-menu', ['pageConfigs' => $pageConfigs, 'breadcrumbs' => $breadcrumbs]); + } + // Empty Layout + public function layout_empty() + { + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Layouts"], ['name' => "Layout Empty"]]; + return view('/content/page-layouts/layout-empty', ['breadcrumbs' => $breadcrumbs]); + } + // Blank Layout + public function layout_blank() + { + $pageConfigs = ['blankPage' => true]; + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Layouts"], ['name' => "Layout Blank"]]; + return view('/content/page-layouts/layout-blank', ['pageConfigs' => $pageConfigs, 'breadcrumbs' => $breadcrumbs]); + } +} diff --git a/backup/app/Http/Controllers@20230511/PagesController.php b/backup/app/Http/Controllers@20230511/PagesController.php new file mode 100644 index 0000000..3fb0948 --- /dev/null +++ b/backup/app/Http/Controllers@20230511/PagesController.php @@ -0,0 +1,88 @@ + "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Pages"], ['name' => "Account Settings"]]; + return view('/content/pages/page-account-settings', ['breadcrumbs' => $breadcrumbs]); + } + + // Profile + public function profile() + { + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Pages"], ['name' => "Profile"]]; + + return view('/content/pages/page-profile', ['breadcrumbs' => $breadcrumbs]); + } + + // FAQ + public function faq() + { + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Pages"], ['name' => "FAQ"]]; + return view('/content/pages/page-faq', ['breadcrumbs' => $breadcrumbs]); + } + + // Knowledge Base + public function knowledge_base() + { + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Pages"], ['name' => "Knowledge Base"]]; + return view('/content/pages/page-knowledge-base', ['breadcrumbs' => $breadcrumbs]); + } + + // Knowledge Base Category + public function kb_category() + { + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Pages"], ['link' => "/page/knowledge-base", 'name' => "Knowledge Base"], ['name' => "Category"]]; + return view('/content/pages/page-kb-category', ['breadcrumbs' => $breadcrumbs]); + } + + // Knowledge Base Question + public function kb_question() + { + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Pages"], ['link' => "/page/knowledge-base", 'name' => "Knowledge Base"], ['link' => "/page/kb-category", 'name' => "Category"], ['name' => "Question"]]; + return view('/content/pages/page-kb-question', ['breadcrumbs' => $breadcrumbs]); + } + + // pricing + public function pricing() + { + $pageConfigs = ['pageHeader' => false]; + return view('/content/pages/page-pricing', ['pageConfigs' => $pageConfigs]); + } + + // blog list + public function blog_list() + { + $pageConfigs = ['contentLayout' => 'content-detached-right-sidebar', 'bodyClass' => 'content-detached-right-sidebar']; + + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Pages"], ['link' => "javascript:void(0)", 'name' => "Blog"], ['name' => "List"]]; + + return view('/content/pages/page-blog-list', ['breadcrumbs' => $breadcrumbs, 'pageConfigs' => $pageConfigs]); + } + + // blog detail + public function blog_detail() + { + $pageConfigs = ['contentLayout' => 'content-detached-right-sidebar', 'bodyClass' => 'content-detached-right-sidebar']; + + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Pages"], ['link' => "javascript:void(0)", 'name' => "Blog"], ['name' => "Detail"]]; + + return view('/content/pages/page-blog-detail', ['breadcrumbs' => $breadcrumbs, 'pageConfigs' => $pageConfigs]); + } + + // blog edit + public function blog_edit() + { + + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Pages"], ['link' => "javascript:void(0)", 'name' => "Blog"], ['name' => "Edit"]]; + + return view('/content/pages/page-blog-edit', ['breadcrumbs' => $breadcrumbs]); + } +} diff --git a/backup/app/Http/Controllers@20230511/PaymentController.php b/backup/app/Http/Controllers@20230511/PaymentController.php new file mode 100644 index 0000000..78f3764 --- /dev/null +++ b/backup/app/Http/Controllers@20230511/PaymentController.php @@ -0,0 +1,294 @@ +pluck('id')->toarray(); + $payments = Payment::sortedData($payments)->get(); + $count = $payments->count(); + $sum = $payments->sum('amount'); + } + else { + return redirect()->route('payments.index')->with('error','Invalid Request'); + } + } + elseif(isset($_GET['start_date']) && isset($_GET['end_date'])) + { + $startdate = strtotime($_GET['start_date']); + $enddate = strtotime($_GET['end_date']); + + if ( $startdate == true && $enddate == true) { + $payments = Payment::Datebetween($_GET['start_date'], $_GET['end_date'])->pluck('id')->toarray(); + $payments = Payment::sortedData($payments)->get(); + $count = $payments->count(); + $sum = $payments->sum('amount'); + } else { + return redirect()->route('payments.index')->with('error','Invalid Request'); + } + } + elseif(isset($_GET['sort'])) + { + $payments= Payment::sort($_GET['sort']); + + $count = $payments->count(); + $sum = $payments->sum('amount'); + + } + elseif(isset($_GET['unpaid'])) + { + $month = $_GET['unpaid']; + + $payments = DB::table('houses') + ->selectRaw('houses.full_address') + ->where('houses.house_type', 'house') + ->whereNotIn('houses.id', function ($query) use ($month) { + $query->select('house_id') + ->from('payments') + ->distinct() + ->where('billingmonth', $month); + })->get(); + + $count = $payments->count(); + $sum = 0 ; + } + else + { + $payments = Payment::get()->pluck('id')->toarray(); + $payments = Payment::sortedData($payments)->get(); + $count = $payments->count(); + $sum = $payments->sum('amount'); + } + + return view('payments.index', compact('payments', 'months', 'count', 'sum', 'id')); + } + + + public function create() + { + $houses = House::with('residents')->where('house_type', 'house')->get(); + + $months = config('global.months'); + + $PaymentModes = PaymentMode::get(); + + return view('payments.create', compact('houses', 'months', 'PaymentModes')); + } + + + public function store(Request $req, Payment $payment) + { + $req->validate([ + 'house_id' =>'required', + 'billingmonth' => 'required', + 'payment_modes_id' =>'required', + 'dateofdeposit' => 'required', + 'comments' => 'nullable' + ]); + + if($req['billingmonth'][0] == 'init') + { + + $initialpayment = Payment::where('house_id', $req->house_id)->where('billingmonth','init')->first(); + + if($initialpayment == null) + { + $payment=Payment::create([ + + 'house_id' => $req['house_id'], + 'billingmonth' => $req['billingmonth'][0], + 'amount' => $this->initialpayment, + 'payment_modes_id' => $req->payment_modes_id, + 'dateofdeposit' => Carbon::parse($req->dateofdeposit)->format('d-m-Y'), + 'comments' => $req['comments'], + ]); + + Activitylog::create([ + 'user_id' => Auth::user()->id, + 'action' => 'Created', + 'module_id' => 1, + 'module_item_id' => $payment->id + ]); + + if($req['billingmonth']) + { + foreach($req['billingmonth'] as $month) + { + if(Payment::where('house_id', $req->house_id)->where('billingmonth',$month)->first() == null) + { + $payment=Payment::create([ + + 'house_id' => $req['house_id'], + 'billingmonth' => $month, + 'amount' => $this->monthlypayment, + 'payment_modes_id' => $req->payment_modes_id, + 'dateofdeposit' => Carbon::parse($req->dateofdeposit)->format('d-m-Y'), + 'comments' => $req['comments'] + ]); + Activitylog::create([ + 'user_id' => Auth::user()->id, + 'action' => 'Created', + 'module_id' => 1, + 'module_item_id' => $payment->id + ]); + } + } + } + return back()->with('success', 'Payment Added Successfully'); + } + } + else + { + foreach($req['billingmonth'] as $month) + { + if(Payment::where('house_id', $req->house_id)->where('billingmonth',$month)->first() == null) + { + $payment=Payment::create([ + 'house_id' => $req['house_id'], + 'billingmonth' => $month, + 'amount' => $this->monthlypayment, + 'payment_modes_id' => $req->payment_modes_id, + 'dateofdeposit' => Carbon::parse($req->dateofdeposit)->format('d-m-Y'), + 'comments' => $req['comments'] + ]); + Activitylog::create([ + 'user_id' => Auth::user()->id, + 'action' => 'Created', + 'module_id' => 1, + 'module_item_id' => $payment->id + ]); + } + } + return back()->with('success', 'Payment Added Successfully'); + } + } + + + public function show(Payment $payment) + { + // + } + + + public function edit(Payment $payment) + { + $houses = House::with('residents')->where('house_type', 'house')->get(); + + $months = config('global.months'); + + $PaymentModes = PaymentMode::get(); + + return view('payments.edit', compact('payment', 'houses', 'months', 'PaymentModes')); + } + + + public function update(Request $req, Payment $payment) + { + + $attributes= $req->validate([ + 'house_id' =>'required', + 'billingmonth' => 'required', + 'payment_modes_id' =>'required', + 'dateofdeposit' => 'required', + 'comments' => 'nullable' + ]); + + $exists = Payment::where('house_id',$attributes['house_id'])->where('billingmonth',$attributes['billingmonth'] )->first(); + + if($exists) + { + $payment->update([ + 'payment_modes_id' => $req['payment_modes_id'], + 'dateofdeposit' => Carbon::parse($req->dateofdeposit)->format('d-m-Y'), + 'comments' => $req['comments'] + ]); + + Activitylog::create([ + 'user_id' => Auth::user()->id, + 'action' => 'Updated', + 'module_id' => 1, + 'module_item_id' => $payment->id + ]); + + return redirect()->route('payments.index')->with('success', 'Payment Edited Succesfully'); + } + + $payment->update([ + 'house_id' => $req['house_id'], + 'billingmonth' => $req['billingmonth'], + 'payment_modes_id' => $req->payment_modes_id, + 'dateofdeposit' => Carbon::parse($req->dateofdeposit)->format('d-m-Y'), + 'comments' => $req['comments'] + ]); + + Activitylog::create([ + 'user_id' => Auth::user()->id, + 'action' => 'Updated', + 'module_id' => 1, + 'module_item_id' => $payment->id + ]); + + return redirect()->route('payments.index')->with('success', 'Payment Edited Succesfully'); + } + + public function destroy(Payment $payment) + { + abort_if(auth()->user()->usertype_id != User::ADMIN, 403, 'Access Deined'); + + Activitylog::create([ + 'user_id' => Auth::user()->id, + 'action' => 'Deleted', + 'module_id' => 1, + 'module_item_id' => $payment->id + ]); + + $payment->delete(); + + return back()->with('success','payment deleted successfully'); + } + + public function ajax(Request $request) + { + $houseId = $request->input('house_id'); + + $payments = Payment::where('house_id', $houseId) + ->with('paymentmode') + ->get() + ->map(function ($payment) { + return [ + 'name' => $payment->paymentmode->name, + 'billingmonth' => $payment->billingmonth, + 'dateofdeposit' => $payment->dateofdeposit + ]; + }); + + $payments = collect($payments)->toArray(); + + return response()->json([ + 'payments' => isset($payments[0]) ? $payments : null + ]); + } +} diff --git a/backup/app/Http/Controllers@20230511/PlaylistController.php b/backup/app/Http/Controllers@20230511/PlaylistController.php new file mode 100644 index 0000000..09dc8f9 --- /dev/null +++ b/backup/app/Http/Controllers@20230511/PlaylistController.php @@ -0,0 +1,160 @@ +validate([ + 'model_type' => "bail|required|in:event,video", + 'model_id' => "bail|required|numeric|exists:{$request->model_type}s,id", + 'type' => "bail|required|in:reminder" + ]); + + + $playlist = Playlist::where([ + 'model_type' => $request->model_type, + 'model_id' => $request->model_id, + 'user_id' => auth()->user()->id, + 'playlist_type' => $request->type + ])->first(); + + if($playlist) { + $playlist->delete(); + + if($request->model_type == 'event') { + $event = Event::find($request->model_id); + $record = ScheduledNotification::where( + 'notification', + Serializer::create()->serializeNotifiable(new EventReminder($event)) + )->where([ + 'target_id' => auth()->user()->id, + 'target_type' => 'App\User' + ])->first(); + + if($record) { + $record->delete(); + } + } + + return response()->json([ + 'success' => true, + 'newtext' => 'Request Reminder', + 'code' => 'success', + 'title' => 'Success!', + 'message' => 'Reminder Cancelled.' + ]); + } else { + Playlist::create([ + 'model_type' => $request->model_type, + 'model_id' => $request->model_id, + 'playlist_type' => $request->type, + 'user_id' => auth()->user()->id, + ]); + + // Schedule Reminder + try { + if($request->model_type == 'event') { + $event = Event::find($request->model_id); + auth()->user()->notifyAt( + new EventReminder($event), + Carbon::parse(Timezone::convertToLocal($event->start_date_time)) + ); + } + } catch(\Exception $e) { + logger("Runtime Error:" . $e->getMessage()); + } + + return response()->json([ + 'success' => true, + 'newtext' => 'Cancel Reminder', + 'code' => 'success', + 'title' => 'Success!', + 'message' => 'Reminder Requested.', + ]); + } + } + + /** + * 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) + { + // + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param int $id + * @return \Illuminate\Http\Response + */ + public function update(Request $request, $id) + { + // + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function destroy($id) + { + // + } +} diff --git a/backup/app/Http/Controllers@20230511/Presenter/EventController.php b/backup/app/Http/Controllers@20230511/Presenter/EventController.php new file mode 100644 index 0000000..6e8bbf4 --- /dev/null +++ b/backup/app/Http/Controllers@20230511/Presenter/EventController.php @@ -0,0 +1,96 @@ + false, + 'pageHeader' => true, + 'mainLayoutType' => 'subscriber' + ]); + } + /** + * Display a listing of the resource. + * + * @return \Illuminate\Http\Response + */ + public function index() + { + + if(request()->ajax()) { + + $events = Event::join('users', 'users.id', '=', 'events.user_id') + ->join('event_user', 'event_user.event_id', '=', 'events.id') + ->where('event_user.user_id', auth()->user()->id) + ->where('events.status', 'publish'); + + if(request()->get('view') == 'calendar') { + $events->select('events.*', 'start_date_time as start'); + return $events->get()->toJson(); + } + + $events->select('events.*', 'users.name as user_name', 'users.last_name as user_last_name', 'users.email as user_email'); + + return datatables()->of($events) + ->editColumn('title', function($event) { + return Helper::tooltip($event->title, 25); + }) + ->editColumn('created_at', function($event) { + return Timezone::convertToLocal($event->created_at, 'd M Y'); + }) + ->editColumn('status', function($event) { + return $event->statusHtml(); + }) + ->editColumn('start_date_time', function($event) { + return Timezone::convertToLocal($event->start_date_time, 'd M Y h:i A'); + }) + ->addColumn('user_name', function($event) { + $user = $event->user_name . $event->user_last_name ?? ""; + return $user . "
" . "{$event->user_email}"; + }) + ->addColumn('action', function($event) { + $eventInfoUrl = route('presenter.events.show', $event->id); + $liveUrl = route('live.event.index', $event->id); + return " + + Enter Live + "; + + }) + ->rawColumns(['action', 'is_active', 'users', 'status', 'title', 'user_name']) + ->make(true); + } else { + + $breadcrumbs = [ + ['link' => "/", 'name' => "Dashboard"], + ['name' => "Events"] + ]; + return view('/content/events/presenter/index', compact('breadcrumbs')); + } + + } + + public function show($id) + { + $record = Event::findOrFail($id); + $record->start_date_time = Timezone::convertToLocal($record->start_date_time, 'd M Y h:i A'); + return view('/content/events/manage/show', compact('record')); + } +} diff --git a/backup/app/Http/Controllers@20230511/PresenterController.php b/backup/app/Http/Controllers@20230511/PresenterController.php new file mode 100644 index 0000000..b07eb41 --- /dev/null +++ b/backup/app/Http/Controllers@20230511/PresenterController.php @@ -0,0 +1,270 @@ +ajax()) { + switch(request()->get('view')) { + case 'all': + $users = User::role('presenter')->where('id', '<>', auth()->user()->id); + break; + case 'trash': + $users = User::role('presenter')->onlyTrashed()->where('id', '<>', auth()->user()->id); + break; + } + + return datatables()->of($users) + ->editColumn('created_at', function($user) { + return Timezone::convertToLocal($user->created_at, 'd M Y'); + }) + ->editColumn('is_active', function($user) { + if($user->approved()) { + return $user->statusHtml(); + } else if($user->profile_status == 'decline') { + return 'Declined'; + } else { + return 'Not Approved'; + } + }) + ->addColumn('action', function($user) { + $deleteUrl = route('presenters.destroy', $user->id); + + if($user->trashed()) { + $url = route('presenters.restore', $user->id); + + return " + + + + "; + } else { + $url = route('presenters.edit', $user->id); + + return " + + + + "; + + } + }) + ->rawColumns(['action', 'is_active']) + ->make(true); + } else { + $pageConfigs = ['pageHeader' => true]; + $breadcrumbs = [ + ['link' => "/", 'name' => "Dashboard"], + ['name' => "Presenters"] + ]; + return view('/content/presenters/index', compact('breadcrumbs')); + } + + } + + /** + * Show the form for creating a new resource. + * + * @return \Illuminate\Http\Response + */ + public function create() + { + return view('/content/presenters/create'); + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function store(Request $request) + { + $request->validate($this->validationRules()); + + $user = new User(); + $user->name = $request->name; + $user->email = $request->email; + $user->password = Hash::make($request->password); + $user->is_active = true; + $user->save(); + + $user->syncRoles(['presenter']); + + if($request->has('notify')) { + // Todo - Send Credentias on email. + $user->sendCredentials($request->password); + } + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Presenter created successfully.' + ]); + } + + /** + * 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) + { + $user = User::withTrashed()->findOrFail($id); + $userMeta = []; + $userMetaRecords = UserMeta::where('user_id', $user->id)->get(); + foreach ($userMetaRecords as $meta) { + $userMeta[$meta->meta_key] = $meta->meta_value; + } + $userAddress = $user->address('institution_address'); + return view('/content/presenters/edit', compact('user', 'userAddress', 'userMeta')); + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param int $id + * @return \Illuminate\Http\Response + */ + public function update(Request $request, $id) + { + $user = User::findOrFail($id); + // $passwordValidation = !empty($request->password) ? 'required|min:6' : ''; + // $request->validate($this->validationRules([ + // 'email' => 'required|email|unique:users,email,' . $id, + // 'password' => $passwordValidation + // ])); + + // $user->name = $request->name; + // $user->email = $request->email; + // if(!empty($request->password)) { + // $user->password = Hash::make($request->password); + // } + if($request->has('profile_status') && in_array($request->profile_status, array_keys(config('setting.profile_status')))) { + $user->profile_status = $request->profile_status; + $user->notify(new AccountApproved); + } + + if($request->has('is_active')) { + $user->is_active = $request->is_active == 1 ? true : false; + } + $user->save(); + + + if(!empty($request->password) && $request->has('notify')) { + // Todo - Send Credentias on email. + $user->sendCredentials($request->password); + } + // Todo - Send Credentias on email. + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Presenter updated successfully.' + ]); + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function destroy($id) + { + $user = User::withTrashed()->findOrFail($id); + if ($user->trashed()) { + $user->forceDelete(); + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Presenter permanently deleted successfully.' + ]); + } else { + $user->delete(); + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Presenter moved to trash successfully.' + ]); + } + } + + public function restore($id) + { + $user = User::withTrashed()->findOrFail($id); + if($user->trashed()) { + $user->restore(); + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Presenter user restored successfully.' + ]); + } else { + return response()->json([ + 'message' => 'Not found' + ], 404); + } + } + + public function validationRules($overrideRule = []) + { + $rules = [ + 'name' => 'required|max:255', + 'email' => 'required|email|max:255|unique:users', + 'password' => 'required|min:6|max:255' + ]; + return array_merge($rules, $overrideRule); + } + +} diff --git a/backup/app/Http/Controllers@20230511/ResidentController.php b/backup/app/Http/Controllers@20230511/ResidentController.php new file mode 100644 index 0000000..8295d7a --- /dev/null +++ b/backup/app/Http/Controllers@20230511/ResidentController.php @@ -0,0 +1,141 @@ +select('residents.*') + ->where('users.name', 'Like',$search.'%') + ->get(); + + } + else { + + $residents=Resident::orderBy('house_id')->get(); + } + + return view('residents.index', compact('residents')); + } + + + public function create($id) + { + $users= User::where('usertype_id',2)->orderby('name','asc')->get(); + + $houses = House::where('house_type', 'house')->get(); + + return view('residents.create', compact('users', 'houses' , 'id')); + } + + public function store(Request $request, Resident $resident) + { + $attributes =$request->validate([ + 'house_id' => 'required', + 'user_id' => 'required', + 'isOwner' => 'required', + 'datofoccupancy' => 'required|date' + ]); + + $resident = Resident::recordExist($attributes)->first(); + + if($resident) + { + return back()->with('error', 'Record Already Exist'); + } + + $owner= Resident::where('house_id', $attributes['house_id'])->where('isOwner', 1)->first(); + + if($owner) + { + if($attributes['isOwner']) + { + + return back()->with('error', 'Owner Already Exist'); + } + } + + Resident::create([ + 'house_id' => $attributes['house_id'], + 'user_id' => $attributes['user_id'], + 'isOwner' => $attributes['isOwner'], + 'datofoccupancy' => Carbon::parse($attributes['datofoccupancy'])->format('d-m-Y') + ]); + + if($request->house) + { + return redirect()->route('houses.show', $request->house)->with('success', 'Resident Added Successfully'); + } + else + { + return redirect()->route('residents.index')->with('success', 'Resident Added Successfully'); + } + } + + public function show(Resident $resident) + { + // + } + + public function edit(Resident $resident) + { + $users= User::where('usertype_id',User::RESIDENT)->orderby('name','asc')->get(); + + $houses = House::where('house_type', 'house')->get(); + + $occupancyTypes = ['0' => 'Tenant', '1' => 'Owner']; + + return view('residents.edit', compact('users', 'resident', 'houses', 'occupancyTypes')); + } + + public function update(Request $request, Resident $resident) + { + $attributes =$request->validate([ + 'house_id' => 'required', + 'isOwner' => 'required', + 'user_id' => 'required', + 'datofoccupancy' => 'required|date' + ]); + + $owner= Resident::where('house_id', $attributes['house_id'])->where('isOwner', 1)->where('id', '!=', $resident->id)->first(); + + if($owner) + { + if($attributes['isOwner']) + { + + return back()->with('error', 'Owner Already Exist'); + } + } + + + $resident->update([ + 'user_id' => $attributes['user_id'], + 'datofoccupancy' => Carbon::parse($attributes['datofoccupancy'])->format('d-m-Y'), + 'house_id' => $attributes['house_id'], + 'isOwner' => $attributes['isOwner'], + ]); + + return redirect()->route('residents.index'); + } + + public function destroy(Resident $resident) + { + $resident->delete(); + + return back()->with('success', 'Record Deleted Successfully'); + } +} diff --git a/backup/app/Http/Controllers@20230511/SocietyController.php b/backup/app/Http/Controllers@20230511/SocietyController.php new file mode 100644 index 0000000..c213a75 --- /dev/null +++ b/backup/app/Http/Controllers@20230511/SocietyController.php @@ -0,0 +1,88 @@ +validate([ + + 'name' => 'required|max:255|min:3|unique:societies', + 'description' => 'required|min:3', + ]); + + if($req->file('image')) + { + + $path = $req->file('image')->store('public/files'); + + $attributes+=[ + + 'image' => $path, + ]; + } + + Society::create($attributes); + + return redirect()->route('society.index'); + } + + // public function edit(Society $society) + // { + + // return view('societies.edit', compact('society')); + // } + + public function update(Request $request, $id) + { + + $society = Society::findOrFail($id); + + $validator = Validator::make($request->all(), [ + + 'name' => 'required|max:255|min:3', + 'description' => 'required|min:3', + ]); + + if ($validator->fails()) { + return response()->json([ + 'error' => $validator->errors() + ]); + } + + $society->update([ + 'name' => $request->name, + 'description' => $request->description, + ]); + + return response()->json(['success'=>'society updated successfully']); + } + + public function delete(Society $society) + { + $society->delete(); + + + return redirect()->route('society.index'); + } +} diff --git a/backup/app/Http/Controllers@20230511/Subscriber/EventController.php b/backup/app/Http/Controllers@20230511/Subscriber/EventController.php new file mode 100644 index 0000000..ef491c5 --- /dev/null +++ b/backup/app/Http/Controllers@20230511/Subscriber/EventController.php @@ -0,0 +1,74 @@ + false, + 'pageHeader' => false, + 'mainLayoutType' => 'subscriber' + ]); + } + + public function index() + { + if (request()->get('s')) { + $events = Event::where('status', Event::UPCOMING) + ->whereHas('keywords', function ($q) { + $q->where('keyword_name', 'like', "%" . request()->get('s') . "%"); + }); + } else { + $events = Event::where('status', Event::UPCOMING); + } + + $events->orderBy('start_date_time', 'asc'); + + $events = $events->paginate(9); + + return view('content/subscriber/events/index', compact('events')); + } + + public function show(Request $request, $id) + { + $pageConfigs = [ + 'pageHeader' => false, + 'showMenu' => false, + 'verticalMenuNavbarType' => 'hidden', + 'pageClass' => 'chat-application', + 'mainLayoutType' => 'subscriber' + ]; + + $event = Event::findOrFail($id); + + if( auth()->user()->hasRole('super_admin') || auth()->user()->id == $event->user_id ) {} else { + if($event->status != Event::UPCOMING) { + abort(403, "Access Denied"); + } + } + + $event->token = $event->generateToken(); + + $keywords = $event->keywords()->pluck('keyword_name')->toArray(); + $events = Event::where('status', Event::UPCOMING) + ->whereHas('keywords', function ($q) use ($keywords) { + foreach($keywords as $keyword) { + $q->orWhere('keyword_name', 'like', "%" . $keyword . "%"); + } + }) + ->where('id', '<>', $event->id) + ->orderBy('start_date_time', 'asc')->limit(3)->get(); + + return view('content/subscriber/events/show', compact('event', 'events', 'pageConfigs')); + } +} diff --git a/backup/app/Http/Controllers@20230511/Subscriber/VideoController.php b/backup/app/Http/Controllers@20230511/Subscriber/VideoController.php new file mode 100644 index 0000000..ae6ddc5 --- /dev/null +++ b/backup/app/Http/Controllers@20230511/Subscriber/VideoController.php @@ -0,0 +1,67 @@ + false, + 'pageHeader' => false, + 'mainLayoutType' => 'subscriber' + ]); + } + + public function index() + { + if (request()->get('s')) { + $videos = Video::where('status', 'publish') + ->whereHas('keywords', function ($q) { + $q->where('keyword_name', 'like', "%" . request()->get('s') . "%"); + }); + } else { + $videos = Video::where('status', 'publish'); + } + + $videos = $videos->paginate(9); + + return view('content/subscriber/videos/index', compact('videos')); + } + + public function show(Request $request, $id) + { + $pageConfigs = [ + 'pageHeader' => false, + 'showMenu' => false, + 'verticalMenuNavbarType' => 'hidden', + 'pageClass' => 'chat-application', + 'mainLayoutType' => 'subscriber' + ]; + + $video = Video::findOrFail($id); + if( auth()->user()->hasRole('super_admin') || auth()->user()->id == $video->user_id ) {} else { + if($video->status != 'publish') { + abort(403, "Access Denied"); + } + } + $keywords = $video->keywords()->pluck('keyword_name')->toArray(); + + $videos = Video::where('status', 'publish') + ->whereHas('keywords', function ($q) use ($keywords) { + foreach($keywords as $keyword) { + $q->orWhere('keyword_name', 'like', "%" . $keyword . "%"); + } + })->limit(3)->get(); + + return view('content/subscriber/videos/show', compact('video', 'videos', 'pageConfigs')); + } +} diff --git a/backup/app/Http/Controllers@20230511/SubscriberController.php b/backup/app/Http/Controllers@20230511/SubscriberController.php new file mode 100644 index 0000000..0ad104b --- /dev/null +++ b/backup/app/Http/Controllers@20230511/SubscriberController.php @@ -0,0 +1,259 @@ +ajax()) { + switch (request()->get('view')) { + case 'all': + $users = User::role('subscriber')->where('users.id', '<>', auth()->user()->id); + break; + case 'trash': + $users = User::role('subscriber')->leftJoin('subscriptions', 'subscriptions.user_id', '=', 'users.id') + ->onlyTrashed() + ->where('users.id', '<>', auth()->user()->id)->select('users.*', 'subscriptions.stripe_status as stripe_status'); + break; + } + $users->where('email_verified_at', '<>', NULL); + + if(request()->get('can_contact')) { + $users->where('can_contact', request()->get('can_contact')); + } + if(request()->get('subscription_status')) { + // $users->where('can_contact', request()->get('can_contact')); + } + + return datatables()->of($users) + ->editColumn('created_at', function ($user) { + return Timezone::convertToLocal($user->created_at, 'd M Y'); + }) + ->editColumn('email', function($user) { + return "{$user->email}"; + }) + ->editColumn('last_name', function($user) { + if(is_null($user->last_name) || $user->last_name == "") { + return "N/A"; + } + return $user->last_name; + }) + ->editColumn('is_active', function ($user) { + return $user->statusHtml(); + }) + ->editColumn('can_contact', function($user) { + return $user->can_contact ? "Yes" : "No"; + }) + ->addColumn('subscription_status', function($user) { + if ($user->subscribed('default')) { + return "Subscribed"; + } else { + return "Not Subscribed"; + } + }) + ->addColumn('action', function ($user) { + + $showUrl = route('users.show', $user->id); + $title = $user->fullName() . " - " . $user->email; + return " + + "; + + }) + ->rawColumns(['action', 'is_active', 'subscription_status', 'email']) + ->make(true); + } else { + $pageConfigs = ['pageHeader' => true]; + $breadcrumbs = [ + ['link' => "/", 'name' => "Dashboard"], + ['name' => "Subscribers"] + ]; + return view('/content/users/index', compact('breadcrumbs')); + } + } + + /** + * Show the form for creating a new resource. + * + * @return \Illuminate\Http\Response + */ + public function create() + { + return view('/content/users/create'); + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function store(Request $request) + { + $request->validate($this->validationRules()); + + $user = new User(); + $user->name = $request->name; + $user->email = $request->email; + $user->password = Hash::make($request->password); + $user->is_active = true; + $user->save(); + + $user->syncRoles(['user']); + + if ($request->has('notify')) { + // Todo - Send Credentias on email. + $user->sendCredentials($request->password); + } + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Subscriber created successfully.' + ]); + } + + /** + * Display the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function show($id) + { + $user = User::withTrashed()->findOrFail($id); + $userMeta = []; + $userMetaRecords = UserMeta::where('user_id', $user->id)->get(); + foreach ($userMetaRecords as $meta) { + $userMeta[$meta->meta_key] = $meta->meta_value; + } + $userAddress = $user->address('institution_address'); + return view('/content/users/show', compact('user', 'userAddress', 'userMeta')); + } + + /** + * Show the form for editing the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function edit($id) + { + $user = User::findOrFail($id); + return view('/content/users/edit', compact('user')); + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param int $id + * @return \Illuminate\Http\Response + */ + public function update(Request $request, $id) + { + $user = User::findOrFail($id); + $passwordValidation = !empty($request->password) ? 'required|min:6' : ''; + $request->validate($this->validationRules([ + 'email' => 'required|email|unique:users,email,' . $id, + 'password' => $passwordValidation + ])); + + $user->name = $request->name; + $user->email = $request->email; + if (!empty($request->password)) { + $user->password = Hash::make($request->password); + } + $user->is_active = $request->is_active == 1 ? true : false; + $user->save(); + + + if (!empty($request->password) && $request->has('notify')) { + // Todo - Send Credentias on email. + $user->sendCredentials($request->password); + } + // Todo - Send Credentias on email. + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Subscriber updated successfully.' + ]); + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function destroy($id) + { + $user = User::withTrashed()->findOrFail($id); + if ($user->trashed()) { + $user->forceDelete(); + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Subscriber permanently deleted successfully.' + ]); + } else { + $user->delete(); + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Subscriber moved to trash successfully.' + ]); + } + } + + public function restore($id) + { + $user = User::withTrashed()->findOrFail($id); + if ($user->trashed()) { + $user->restore(); + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Subscriber restored successfully.' + ]); + } else { + return response()->json([ + 'message' => 'Not found' + ], 404); + } + } + + public function validationRules($overrideRule = []) + { + $rules = [ + 'name' => 'required|max:255', + 'email' => 'required|email|max:255|unique:users', + 'password' => 'required|min:6|max:255' + ]; + return array_merge($rules, $overrideRule); + } +} diff --git a/backup/app/Http/Controllers@20230511/Subscriptions/PaymentController.php b/backup/app/Http/Controllers@20230511/Subscriptions/PaymentController.php new file mode 100644 index 0000000..8fc3a15 --- /dev/null +++ b/backup/app/Http/Controllers@20230511/Subscriptions/PaymentController.php @@ -0,0 +1,28 @@ + auth()->user()->createSetupIntent() + ]; + + return view('subscriptions.payment')->with($data); + } + + public function store(Request $request) { + $this->validate($request, [ + 'token' => 'required' + ]); + + $request->user()->newSubscription('default', 'price_1IWmwFGJDz1oPimHukgcaXhe')->create($request->token); + + return back(); + } +} diff --git a/backup/app/Http/Controllers@20230511/Subscriptions/SubscriptionController.php b/backup/app/Http/Controllers@20230511/Subscriptions/SubscriptionController.php new file mode 100644 index 0000000..273daee --- /dev/null +++ b/backup/app/Http/Controllers@20230511/Subscriptions/SubscriptionController.php @@ -0,0 +1,25 @@ +user()->newSubscription('default', 'price_1IWmwFGJDz1oPimHukgcaXhe') + ->trialDays(3) + ->allowPromotionCodes() + ->checkout(); + $checkouts['professor'] = auth()->user()->newSubscription('default', 'price_1IWmwFGJDz1oPimHukgcaXhe') + ->allowPromotionCodes() + ->checkout(); + $checkouts['student'] = auth()->user()->newSubscription('default', 'price_1IWmwFGJDz1oPimHukgcaXhe') + ->allowPromotionCodes() + ->checkout(); + $plans = config('plan'); + return view('subscriptions.plans', compact('plans', 'checkouts')); + } +} diff --git a/backup/app/Http/Controllers@20230511/TableController.php b/backup/app/Http/Controllers@20230511/TableController.php new file mode 100644 index 0000000..49a272c --- /dev/null +++ b/backup/app/Http/Controllers@20230511/TableController.php @@ -0,0 +1,46 @@ + "/", 'name' => "Home"], ['name' => "Table Bootstrap"]]; + return view('/content/table/table-bootstrap/table-bootstrap', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Datatable Basic + public function datatable_basic() + { + $breadcrumbs = [['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Datatable"], ['name' => "Basic"]]; + return view('/content/table/table-datatable/table-datatable-basic', ['breadcrumbs' => $breadcrumbs]); + } + + // Datatable Basic + public function datatable_advance() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "Datatable"], ['name' => "Advanced"] + ]; + return view('/content/table/table-datatable/table-datatable-advance', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // ag-Grid Table + public function ag_grid() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['name' => "agGrid Table"] + ]; + return view('/content/table/table-ag-grid/table-ag-grid', [ + 'breadcrumbs' => $breadcrumbs + ]); + } +} diff --git a/backup/app/Http/Controllers@20230511/UserController.php b/backup/app/Http/Controllers@20230511/UserController.php new file mode 100644 index 0000000..065fc06 --- /dev/null +++ b/backup/app/Http/Controllers@20230511/UserController.php @@ -0,0 +1,317 @@ +orderBy('name', 'asc') + ->get(); + + } + + return view('users.index', compact('users')); + } + + + public function create() + { + $usertypes = Usertype::get(); + + return view('users.create', compact('usertypes')); + } + + + public function store(Request $request) + { + $request->validate([ + 'name' => 'required|max:255|min:3', + 'mobile1' => 'required|unique:users,mobile1|gt:0|numeric', + 'mobile2' => 'nullable|unique:users|gt:0|numeric', + 'email' => 'nullable|unique:users|email', + 'password' => 'required|min:8', + 'confirmPassword' => 'required|same:password', + 'usertype_id' => 'required', + ]); + + User::create([ + 'name' => $request->name, + 'password' => Hash::make($request->password), + 'mobile1' => $request->mobile1, + 'mobile2' => $request->mobile2, + 'email' => $request->email, + 'usertype_id' => $request->usertype_id, + ]); + + return redirect()->route('users.index')->with('success', 'User Created Successfully'); + } + + + public function show(string $id) + { + // + } + + + public function edit(User $user) + { + $usertypes = Usertype::get(); + + return view('users.edit', compact('usertypes', 'user')); + } + + + public function update(Request $request, User $user) + { + $user = User::findOrFail($user->id); + + $attributes = $request->validate([ + 'name' => 'required|max:255|min:3', + 'mobile1' => [ + 'required', + 'gt:0', + 'numeric', + Rule::unique('users')->ignore($user), + ], + 'mobile2' => [ + 'nullable', + 'gt:0', + 'numeric', + Rule::unique('users')->ignore($user), + ], + 'email' => [ + 'nullable','email' + ], + 'usertype_id' => 'required' + ]); + + $password = $request->validate([ + 'password' => 'nullable|min:8', + 'confirmPassword' => 'same:password', + ]); + + if(!empty($password['password'])) + { + $user->update([ + 'password' => Hash::make( $password['password']) + ]); + } + + $user->update($attributes); + + return redirect()->route('users.index')->with('success', 'User Updated Successfully'); + } + + + public function destroy($id) + { + $user = User::findOrFail($id); + + if($user->usertype_id == USER::ADMIN) + { + $count = User::where('usertype_id',1)->get()->count(); + if($count > 1) + { + $user->delete(); + return back()->with('success','Admin Deleted Successfully'); + } + else + { + return back()->with('error','Admin Cant Delete Himself'); + } + } + $user->delete(); + + return back()->with('success', 'User Deleted Successfully'); + } + public function home() + { + + return view('users.home'); + } + + public function profileEdit() + { + $usertypes = Usertype::get(); + + $user = Auth::user(); + + return view('users.profileEdit', compact('user', 'usertypes')); + } + + public function profileupdate(Request $request, User $user) + { + + $user = User::findOrFail($user->id); + + $attributes = $request->validate([ + 'name' => 'required|max:255|min:3', + 'mobile1' => [ + 'required', + 'numeric', + 'gt:0', + Rule::unique('users')->ignore($user), + ], + 'mobile2' => [ + 'nullable', + 'numeric', + 'gt:0', + Rule::unique('users')->ignore($user), + ], + 'email' => [ + 'nullable', + 'email', + Rule::unique('users')->ignore($user), + ], + ]); + + $user->update($attributes); + + return redirect()->route('user.home')->with('success', 'Profile Updated Successfully'); + } + public function report() + { + $months = config('global.months'); + + return view('users.report',compact('months')); + } + + public function profile() + { + $user = Auth::user(); + + return view('users.profile' , compact('user')); + } + public function adminProfile() + { + $user = Auth::user(); + + return view('adminprofile' , compact('user')); + } + + public function resetPassword(User $user, Request $request) + { + $request->validate([ + + 'oldPassword' => 'required|min:8', + 'newPassword' => 'required|min:8', + 'confirmPassword' => 'required|same:newPassword|min:8' + ]); + + if (Hash::check($request->oldPassword, $user->password)) + { + $user->update([ + + 'password' => Hash::make($request->newPassword) + ]); + + return back()->with('success', 'Password Changed Successfully'); + } + else + { + return back()->with('error', 'Current Password is Incorrect'); + } + } + public function forgetpassword(Request $request) + { + $user = User::where('mobile1', $request->mobile)->first(); + + if($user) + { + if($user->email) + { + + Notification::send($user, new ForgetPassword($user)); + + return back()->with('success', 'Please Check Your Mail'); + } + else + { + + return back()->with('success', 'Please Contact Admin (XXXX XXX XXX)'); + + } + } + else + { + return back()->with('success', 'Please Enter Registered Number'); + } + } + + public function forget($id) + { + $user= User::where('id',$id)->first(); + + return view('users/forgetpasswordcreate', compact('user')); + } + public function forgetstore(User $user, Request $req) + { + $req->validate([ + 'password' => 'required|min:8', + 'confirmPassword' => 'required|same:password' + ]); + + $user->update([ + 'password' => Hash::make($req->password) + ]); + + return redirect("/")->with('success', 'Password Changed Successfully'); + } + + public function imagestore(Request $request) + { + $this->validate($request, [ + 'image' => 'required|image|mimes:jpg,png,jpeg,gif,svg', + ]); + + $image_path = $request->file('image')->storeAs('public/image', 'UserImage'.time().'.jpg'); + + Auth()->user()->update([ + 'user_image' => $image_path + ]); + + return back()->with('success', 'Image Updated Successfully'); + } + + public function resetcreate(User $user) + { + + return view('reset',compact('user')); + } + + public function userresetcreate(User $user) + { + + return view('users.reset',compact('user')); + } + + public function imageDestroy(User $user) { + if($user->user_image){ + $user->update([ + 'user_image' => null + ]); + return back()->with('success','image removed successfully'); + } + return back(); + } +} diff --git a/backup/app/Http/Controllers@20230511/UserInterfaceController.php b/backup/app/Http/Controllers@20230511/UserInterfaceController.php new file mode 100644 index 0000000..4229073 --- /dev/null +++ b/backup/app/Http/Controllers@20230511/UserInterfaceController.php @@ -0,0 +1,41 @@ + "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "UI"], ['name' => "Typography"] + ]; + return view('/content/ui-pages/ui-typography', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // UI Elements - Colors + public function colors() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "UI"], ['name' => "Colors"] + ]; + return view('/content/ui-pages/ui-colors', [ + 'breadcrumbs' => $breadcrumbs + ]); + } + + // Icons Feather + public function icons_feather() + { + $breadcrumbs = [ + ['link' => "/", 'name' => "Home"], ['link' => "javascript:void(0)", 'name' => "UI"], ['name' => "Feather Icons"] + ]; + return view('/content/ui-pages/icons-feather', [ + 'breadcrumbs' => $breadcrumbs + ]); + } +} diff --git a/backup/app/Http/Controllers@20230511/VideoController.php b/backup/app/Http/Controllers@20230511/VideoController.php new file mode 100644 index 0000000..d773adf --- /dev/null +++ b/backup/app/Http/Controllers@20230511/VideoController.php @@ -0,0 +1,339 @@ +ajax()) { + + if (auth()->user()->hasRole('super_admin')) { + $videos = Video::with('user')->where('videos.id', '<>', 0); + if (request()->get('view') == 'trash') { + $videos->onlyTrashed(); + } + } else { + + if (request()->get('view') == 'trash') { + + $videos = Video::onlyTrashed()->leftJoin('events', 'events.id', '=', 'videos.event_id') + ->leftJoin('event_user', 'event_user.event_id', '=', 'events.id') + ->where(function($query) { + $query->where('event_user.user_id', auth()->user()->id); + $query->orWhere('videos.user_id', auth()->user()->id); + }) + ->select('videos.*'); + } else { + $videos = Video::leftJoin('events', 'events.id', '=', 'videos.event_id') + ->leftJoin('event_user', 'event_user.event_id', '=', 'events.id') + ->where(function($query) { + $query->where('event_user.user_id', auth()->user()->id); + $query->orWhere('videos.user_id', auth()->user()->id); + }) + ->select('videos.*'); + } + } + + + if (request()->get('video_status') != "") { + $videos->where('videos.status', request()->get('video_status')); + } + + return datatables()->of($videos) + ->editColumn('title', function ($video) { + $title = Helper::tooltip($video->title, 50); + $videoLink = route('subscriber.videos.show', $video->id); + return "$title "; + }) + ->editColumn('path', function($video) { + $video->path = config('setting.s3_url') . $video->path; + return "View"; + }) + ->editColumn('created_at', function ($video) { + return Timezone::convertToLocal($video->created_at, 'd M Y'); + }) + ->editColumn('status', function ($video) { + return $video->statusHtml(); + }) + ->editColumn('start_date_time', function ($video) { + return Timezone::convertToLocal($video->start_date_time, 'd M Y h:i A'); + }) + ->addColumn('users', function ($video) { + if (isset($video->user->id)) { + if (auth()->user()->id == $video->user->id) { + return "Me"; + } else { + $user = $video->user; + return $video->user->fullName() . "
" . "{$user->email}"; + } + } else { + return "N/A"; + } + }) + ->addColumn('last_name', function($video) { + if(!isset($video->user->id)) { return "N/A"; } + return $video->user->last_name; + }) + ->addColumn('email', function($video) { + if(!isset($video->user->id)) { return "N/A"; } + return $video->user->email; + }) + ->addColumn('action', function ($video) { + + $deleteUrl = route('videos.destroy', $video->id); + + if ($video->trashed()) { + $url = route('videos.restore', $video->id); + + return " + + + + "; + } else { + $url = route('videos.edit', $video->id); + + return " + + + + + "; + } + }) + ->rawColumns(['action', 'path', 'is_active', 'users', 'status', 'title']) + ->make(true); + } else { + + $pageConfigs = ['pageHeader' => true]; + $breadcrumbs = [ + ['link' => "/", 'name' => "Dashboard"], + ['name' => "Videos"] + ]; + return view('/content/videos/manage/index', compact('breadcrumbs')); + } + } + + /** + * Show the form for creating a new resource. + * + * @return \Illuminate\Http\Response + */ + public function create() + { + return view('/content/videos/manage/create'); + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function store(Request $request) + { + $request->validate([ + 'title' => 'required|max:255', + 'video' => 'mimes:mp4,jpg,jpeg|nullable', + 'status' => 'required|in:publish,pending' + ]); + + $path = Storage::disk('s3')->put('videos', $request->video); + + $video = Video::create([ + 'title' => $request->title, + 'status' => $request->status, + 'user_id' => auth()->user()->id, + 'path' => $path + ]); + + foreach($request->keywords as $keywordId) { + if(!is_numeric($keywordId)) { + $keyword = Keyword::create([ + 'keyword_name' => $keywordId, + ]); + $keywordId = $keyword->id; + } + + $keywordIds[] = $keywordId; + } + + $video->keywords()->sync($keywordIds ?? []); + + if ($request->hasFile('logo')) { + $video->addOrUpdateLogo($request->file('logo')); + } + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'message' => 'File uploaded successfully.', + 'title' => 'Congratulations', + 'path' => $path + ]); + } + + /** + * Display the specified resource. + * + * @param \App\Video $video + * @return \Illuminate\Http\Response + */ + public function show(Video $video) + { + // + } + + /** + * Show the form for editing the specified resource. + * + * @param \App\Video $video + * @return \Illuminate\Http\Response + */ + public function edit(Video $video) + { + return view('/content/videos/manage/edit', compact('video')); + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param \App\Video $video + * @return \Illuminate\Http\Response + */ + public function update(Request $request, Video $video) + { + $request->validate([ + 'title' => 'required|max:255', + 'status' => 'required|in:publish,pending' + ]); + + $video->title = $request->title; + $video->status = $request->status; + $video->save(); + + $keywordIds = []; + + foreach($request->keywords as $keywordId) { + if(!is_numeric($keywordId)) { + $keyword = Keyword::create([ + 'keyword_name' => $keywordId, + ]); + $keywordId = $keyword->id; + } + + $keywordIds[] = $keywordId; + } + + $video->keywords()->sync($keywordIds ?? []); + + if ($request->hasFile('logo')) { + $video->addOrUpdateLogo($request->file('logo')); + } + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations!', + 'message' => 'Video information updated successfully.' + ]); + } + + /** + * Remove the specified resource from storage. + * + * @param \App\Video $video + * @return \Illuminate\Http\Response + */ + public function destroy(Video $video) + { + // $record = Event::withTrashed()->findOrFail($id); + $record = $video; + if ($record->trashed()) { + if ($record->path) { + $pathLocation = $record->path; + } else { + $pathLocation = ""; + } + + $record->forceDelete(); + + if (!empty($pathLocation)) { + // Storage::disk('s3')->delete($pathLocation); + } + + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Video permanently deleted successfully.' + ]); + } else { + $record->delete(); + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Video moved to trash successfully.' + ]); + } + } + + public function restore($id) + { + $record = Video::withTrashed()->findOrFail($id); + if ($record->trashed()) { + $record->restore(); + return response()->json([ + 'success' => true, + 'code' => 'success', + 'title' => 'Congratulations', + 'message' => 'Video restored successfully.' + ]); + } else { + return response()->json([ + 'message' => 'Not found' + ], 404); + } + } +} diff --git a/backup/app/Http/Kernel.php b/backup/app/Http/Kernel.php new file mode 100644 index 0000000..7859a64 --- /dev/null +++ b/backup/app/Http/Kernel.php @@ -0,0 +1,73 @@ + + */ + protected $middleware = [ + // \App\Http\Middleware\TrustHosts::class, + \App\Http\Middleware\TrustProxies::class, + \Illuminate\Http\Middleware\HandleCors::class, + \App\Http\Middleware\PreventRequestsDuringMaintenance::class, + \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, + \App\Http\Middleware\TrimStrings::class, + \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::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' => [ + // \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class, + \Illuminate\Routing\Middleware\ThrottleRequests::class.':api', + \Illuminate\Routing\Middleware\SubstituteBindings::class, + ], + ]; + + /** + * The application's middleware aliases. + * + * Aliases may be used to conveniently assign middleware to routes and groups. + * + * @var array + */ + protected $middlewareAliases = [ + 'auth' => \App\Http\Middleware\Authenticate::class, + 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, + 'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::class, + 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, + 'can' => \Illuminate\Auth\Middleware\Authorize::class, + 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, + 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class, + 'signed' => \App\Http\Middleware\ValidateSignature::class, + 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, + 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, + + ]; + + protected $routeMiddleware = [ + 'userType' => \App\Http\Middleware\UserType::class, + 'disable_back_btn' => \App\Http\Middleware\disablebackbtn::class, + ]; +} diff --git a/backup/app/Http/Middleware/Authenticate.php b/backup/app/Http/Middleware/Authenticate.php new file mode 100644 index 0000000..d4ef644 --- /dev/null +++ b/backup/app/Http/Middleware/Authenticate.php @@ -0,0 +1,17 @@ +expectsJson() ? null : route('login'); + } +} diff --git a/backup/app/Http/Middleware/CheckForMaintenanceMode.php b/backup/app/Http/Middleware/CheckForMaintenanceMode.php new file mode 100644 index 0000000..35b9824 --- /dev/null +++ b/backup/app/Http/Middleware/CheckForMaintenanceMode.php @@ -0,0 +1,17 @@ + + */ + protected $except = [ + // + ]; +} diff --git a/backup/app/Http/Middleware/EnsureUserIsSubscribed.php b/backup/app/Http/Middleware/EnsureUserIsSubscribed.php new file mode 100644 index 0000000..588f516 --- /dev/null +++ b/backup/app/Http/Middleware/EnsureUserIsSubscribed.php @@ -0,0 +1,32 @@ +user()->hasRole('super_admin') || auth()->user()->hasRole('admin')) { + return $response; + } + + if(!auth()->user()->subscribed('default')) { + return redirect(route('subscription-required')); + } + + + return $response; + } +} diff --git a/backup/app/Http/Middleware/HttpsProtocol.php b/backup/app/Http/Middleware/HttpsProtocol.php new file mode 100644 index 0000000..0b9d522 --- /dev/null +++ b/backup/app/Http/Middleware/HttpsProtocol.php @@ -0,0 +1,26 @@ +secure()) { + // $url = str_replace("http://", "https://", $request->url()); + // return redirect($url); + // } + + return $next($request); + } +} diff --git a/backup/app/Http/Middleware/IsActive.php b/backup/app/Http/Middleware/IsActive.php new file mode 100644 index 0000000..6b5d203 --- /dev/null +++ b/backup/app/Http/Middleware/IsActive.php @@ -0,0 +1,33 @@ +user()->is_active ) { + Auth::logout(); + if($request->ajax()) { + echo '

Your account in inactive, Click Here to contact for more information.

'; die; + } else { + return redirect(route('login'))->with('account_inactive', true); + } + } + + return $response; + } +} diff --git a/backup/app/Http/Middleware/IsApproved.php b/backup/app/Http/Middleware/IsApproved.php new file mode 100644 index 0000000..a38d54d --- /dev/null +++ b/backup/app/Http/Middleware/IsApproved.php @@ -0,0 +1,27 @@ +user()->hasRole('presenter') && !auth()->user()->approved()) { + return redirect(route('user.account-pending')); + } + + return $response; + } +} diff --git a/backup/app/Http/Middleware/LocaleMiddleware.php b/backup/app/Http/Middleware/LocaleMiddleware.php new file mode 100644 index 0000000..a211517 --- /dev/null +++ b/backup/app/Http/Middleware/LocaleMiddleware.php @@ -0,0 +1,28 @@ +'en', 'fr'=>'fr','de'=>'de','pt'=>'pt']; + + // Locale is enabled and allowed to be change + if(session()->has('locale') && array_key_exists(session()->get('locale'),$availLocale)){ + // Set the Laravel locale + app()->setLocale(session()->get('locale')); + } + return $next($request); + } +} diff --git a/backup/app/Http/Middleware/PreventRequestsDuringMaintenance.php b/backup/app/Http/Middleware/PreventRequestsDuringMaintenance.php new file mode 100644 index 0000000..74cbd9a --- /dev/null +++ b/backup/app/Http/Middleware/PreventRequestsDuringMaintenance.php @@ -0,0 +1,17 @@ + + */ + protected $except = [ + // + ]; +} diff --git a/backup/app/Http/Middleware/RedirectIfAuthenticated.php b/backup/app/Http/Middleware/RedirectIfAuthenticated.php new file mode 100644 index 0000000..afc78c4 --- /dev/null +++ b/backup/app/Http/Middleware/RedirectIfAuthenticated.php @@ -0,0 +1,30 @@ +check()) { + return redirect(RouteServiceProvider::HOME); + } + } + + return $next($request); + } +} diff --git a/backup/app/Http/Middleware/TrimStrings.php b/backup/app/Http/Middleware/TrimStrings.php new file mode 100644 index 0000000..88cadca --- /dev/null +++ b/backup/app/Http/Middleware/TrimStrings.php @@ -0,0 +1,19 @@ + + */ + protected $except = [ + 'current_password', + 'password', + 'password_confirmation', + ]; +} diff --git a/backup/app/Http/Middleware/TrustHosts.php b/backup/app/Http/Middleware/TrustHosts.php new file mode 100644 index 0000000..c9c58bd --- /dev/null +++ b/backup/app/Http/Middleware/TrustHosts.php @@ -0,0 +1,20 @@ + + */ + public function hosts(): array + { + return [ + $this->allSubdomainsOfApplicationUrl(), + ]; + } +} diff --git a/backup/app/Http/Middleware/TrustProxies.php b/backup/app/Http/Middleware/TrustProxies.php new file mode 100644 index 0000000..3391630 --- /dev/null +++ b/backup/app/Http/Middleware/TrustProxies.php @@ -0,0 +1,28 @@ +|string|null + */ + protected $proxies; + + /** + * The headers that should be used to detect proxies. + * + * @var int + */ + protected $headers = + Request::HEADER_X_FORWARDED_FOR | + Request::HEADER_X_FORWARDED_HOST | + Request::HEADER_X_FORWARDED_PORT | + Request::HEADER_X_FORWARDED_PROTO | + Request::HEADER_X_FORWARDED_AWS_ELB; +} diff --git a/backup/app/Http/Middleware/UserType.php b/backup/app/Http/Middleware/UserType.php new file mode 100644 index 0000000..6526ee7 --- /dev/null +++ b/backup/app/Http/Middleware/UserType.php @@ -0,0 +1,20 @@ +user()->usertype_id == 1) { + return $next($request); + } + + abort(403, 'Access Denied'); + } +} + diff --git a/backup/app/Http/Middleware/ValidateSignature.php b/backup/app/Http/Middleware/ValidateSignature.php new file mode 100644 index 0000000..093bf64 --- /dev/null +++ b/backup/app/Http/Middleware/ValidateSignature.php @@ -0,0 +1,22 @@ + + */ + protected $except = [ + // 'fbclid', + // 'utm_campaign', + // 'utm_content', + // 'utm_medium', + // 'utm_source', + // 'utm_term', + ]; +} diff --git a/backup/app/Http/Middleware/VerifyCsrfToken.php b/backup/app/Http/Middleware/VerifyCsrfToken.php new file mode 100644 index 0000000..9e86521 --- /dev/null +++ b/backup/app/Http/Middleware/VerifyCsrfToken.php @@ -0,0 +1,17 @@ + + */ + protected $except = [ + // + ]; +} diff --git a/backup/app/Http/Middleware/disablebackbtn.php b/backup/app/Http/Middleware/disablebackbtn.php new file mode 100644 index 0000000..48c6f93 --- /dev/null +++ b/backup/app/Http/Middleware/disablebackbtn.php @@ -0,0 +1,27 @@ +session()->get('logged_out')) { + $response->headers->set('Cache-Control','no-cache, no-store, max-age=0, must-revalidate'); + } + + return $response; + + } +} diff --git a/backup/app/Models/Activitylog.php b/backup/app/Models/Activitylog.php new file mode 100644 index 0000000..c582452 --- /dev/null +++ b/backup/app/Models/Activitylog.php @@ -0,0 +1,50 @@ +belongsTo(User::class); + } + + public function module() + { + return $this->belongsTo(Module::class); + } + + public function payment() + { + return $this->belongsTo(Payment::class,'module_item_id','id'); + } + public function expense() + { + return $this->belongsTo(Expense::class,'module_item_id','id'); + } + + public function scopeDatebetween($query, $start, $end) + { + return $query->wherebetween('created_at',[$start, $end])->get(); + } +} diff --git a/backup/app/Models/Expense.php b/backup/app/Models/Expense.php new file mode 100644 index 0000000..a432cc8 --- /dev/null +++ b/backup/app/Models/Expense.php @@ -0,0 +1,57 @@ +belongsto(PaymentMode::class,'payment_modes_id', 'id'); + } + public function scopeSort($query, $sort) + { + if($sort == 'Ascending') + { + return $query->orderBy(DB::raw("STR_TO_DATE(dateofpayment, '%d-%m-%Y')"), 'asc')->get(); + } + return $query->orderBy(DB::raw("STR_TO_DATE(dateofpayment, '%d-%m-%Y')"), 'desc')->get(); + } + + public function scopeSearch($query, $search) + { + return $query->where('payee', 'LIKE', '%'.$search.'%')->get(); + } + public function scopeDatebetween($query, $start, $end) + { + return $query->whereBetween( + \DB::raw("STR_TO_DATE(dateofpayment, '%d-%m-%Y')"), + [date('Y-m-d', strtotime($start)), date('Y-m-d', strtotime($end))] + )->get(); + } + public function doneby() + { + return $this->hasManyThrough( + User::class, + Activitylog::class, + 'Module_item_id', + 'id', + 'id', + 'user_id' + )->where('module_id',2)->latest('activity_logs.created_at'); + } +} diff --git a/backup/app/Models/House.php b/backup/app/Models/House.php new file mode 100644 index 0000000..4571b6c --- /dev/null +++ b/backup/app/Models/House.php @@ -0,0 +1,75 @@ +belongsTo(Society::class); + } + + public function residents() + { + return $this->hasMany(Resident::class, 'house_id'); + } + + public function users() + { + return $this->belongsToMany(User::class, 'residents')->withPivot('isOwner', 'datofoccupancy'); + } + + public function scopeAddress($query, $houseid) + { + return $query->where('id', $houseid)->first(); + } + + public function scopeSearch($query, $house) + { + return $query->where('full_address','Like' ,'%'.$house.'%')->get(); + } + public function payments() + { + return $this->hasMany(Payment::class); + } + public function detail() + { + return $this->hasOneThrough( + User::class, + Resident::class, + 'house_id', + 'id', + 'id', + 'user_id' + ); + } + +} diff --git a/backup/app/Models/Module.php b/backup/app/Models/Module.php new file mode 100644 index 0000000..621874a --- /dev/null +++ b/backup/app/Models/Module.php @@ -0,0 +1,11 @@ +belongsTo(House::class,'house_id', 'id'); + } + + public function paymentmode() + { + return $this->belongsto(PaymentMode::class,'payment_modes_id', 'id'); + } + + public function resident() + { + return $this->belongsTo(Resident::class); + } + + public function scopeMonthlyfilter($query, $month) + { + return $query->where('billingmonth', $month)->get(); + } + + public function scopeDatebetween($query, $start, $end) + { + return $query->whereBetween( + \DB::raw("STR_TO_DATE(dateofdeposit, '%d-%m-%Y')"), + [date('Y-m-d', strtotime($start)), date('Y-m-d', strtotime($end))] + )->get(); + } + + public function scopesortedData($query, $payments) + { + return $query->select('payments.*', 'houses.full_address') + ->whereIn('payments.id', $payments) + ->join('houses', 'payments.house_id', '=', 'houses.id') + ->orderBy('houses.block1', 'ASC') + ->orderBy('houses.block2', 'ASC') + ->orderBy('houses.house_no', 'ASC'); + } + + public function scopeSort($query, $sort) + { + if($sort == 'Ascending') + { + return $query->orderBy('dateofdeposit', 'asc')->get(); + } + return $query->orderBy('dateofdeposit', 'desc')->get(); + } + + public function Owner() + { + return $this->hasOneThrough( + User::class, + Resident::class, + 'house_id', + 'id', + 'house_id', + 'user_id' + ); + } + + public function doneby() + { + return $this->hasManyThrough( + User::class, + Activitylog::class, + 'Module_item_id', + 'id', + 'id', + 'user_id' + )->where('module_id',1)->latest('activity_logs.created_at'); + } + public function housename() + { + return House::where('id',$this->house_id)->value('full_address'); + } +} diff --git a/backup/app/Models/PaymentMode.php b/backup/app/Models/PaymentMode.php new file mode 100644 index 0000000..b153cf0 --- /dev/null +++ b/backup/app/Models/PaymentMode.php @@ -0,0 +1,12 @@ +where('user_id', $record['user_id']) + ->where('house_id', $record['house_id']) + ->where('isOwner', $record['isOwner']); + } + + public function user() + { + return $this->belongsTo(User::class); + } + + public function house() + { + return $this->belongsTo(House::class); + } + + public function payments() + { + return $this->hasMany(Payment::class); + } + +} diff --git a/backup/app/Models/Society.php b/backup/app/Models/Society.php new file mode 100644 index 0000000..1748f14 --- /dev/null +++ b/backup/app/Models/Society.php @@ -0,0 +1,19 @@ + + */ + protected $fillable = [ + 'name', + 'email', + 'password', + 'mobile1', + 'mobile2', + 'usertype_id', + 'user_image' + ]; + + /** + * The attributes that should be hidden for serialization. + * + * @var array + */ + protected $hidden = [ + 'password', + 'remember_token', + ]; + + /** + * The attributes that should be cast. + * + * @var array + */ + protected $casts = [ + 'email_verified_at' => 'datetime', + ]; + + public function usertype() + { + return $this->belongsTo(Usertype::class); + } + + public function houses() + { + return $this->belongsToMany(House::class, 'residents')->withPivot('isOwner', 'datofoccupancy'); + } + + public function residents() + { + return $this->hasMany(Resident::class); + } + + public function payments() + { + return $this->hasManyThrough(Payment::class, Resident::class,'user_id', 'house_id', 'id','house_id'); + } + + public function scopesearch($query, $search) + { + return $query->where('name', 'Like' ,$search.'%') + ->orwhere('mobile1', 'Like', '%'.$search.'%')->get(); + } +} diff --git a/backup/app/Models/Usertype.php b/backup/app/Models/Usertype.php new file mode 100644 index 0000000..f7d8bc8 --- /dev/null +++ b/backup/app/Models/Usertype.php @@ -0,0 +1,13 @@ +belongsTo(User::class); + } + + public function module() + { + return $this->belongsTo(Module::class); + } + + public function payment() + { + return $this->belongsTo(Payment::class,'module_item_id','id'); + } + public function expense() + { + return $this->belongsTo(Expense::class,'module_item_id','id'); + } + + public function scopeDatebetween($query, $start, $end) + { + return $query->wherebetween('created_at',[$start, $end])->get(); + } +} diff --git a/backup/app/Models@20230511/Expense.php b/backup/app/Models@20230511/Expense.php new file mode 100644 index 0000000..a6b1c65 --- /dev/null +++ b/backup/app/Models@20230511/Expense.php @@ -0,0 +1,45 @@ +belongsto(PaymentMode::class,'payment_modes_id', 'id'); + } + public function scopeSort($query, $sort) + { + if($sort == 'Ascending') + { + return $query->orderBy(DB::raw("STR_TO_DATE(dateofpayment, '%d-%m-%Y')"), 'asc')->get(); + } + return $query->orderBy(DB::raw("STR_TO_DATE(dateofpayment, '%d-%m-%Y')"), 'desc')->get(); + } + + public function scopeSearch($query, $search) + { + return $query->where('payee', 'LIKE', '%'.$search.'%')->get(); + } + public function scopeDatebetween($query, $start, $end) + { + return $query->whereBetween( + \DB::raw("STR_TO_DATE(dateofpayment, '%d-%m-%Y')"), + [date('Y-m-d', strtotime($start)), date('Y-m-d', strtotime($end))] + )->get(); + } +} diff --git a/backup/app/Models@20230511/House.php b/backup/app/Models@20230511/House.php new file mode 100644 index 0000000..b5c8f4d --- /dev/null +++ b/backup/app/Models@20230511/House.php @@ -0,0 +1,63 @@ +belongsTo(Society::class); + } + + public function residents() + { + return $this->hasMany(Resident::class, 'house_id'); + } + + public function users() + { + return $this->belongsToMany(User::class, 'residents')->withPivot('isOwner', 'datofoccupancy'); + } + + public function scopeAddress($query, $houseid) + { + return $query->where('id', $houseid)->first(); + } + + public function scopeSearch($query, $house) + { + return $query->where('full_address','Like' ,'%'.$house.'%')->get(); + } + public function payments() + { + return $this->hasMany(Payment::class); + } + +} diff --git a/backup/app/Models@20230511/Module.php b/backup/app/Models@20230511/Module.php new file mode 100644 index 0000000..621874a --- /dev/null +++ b/backup/app/Models@20230511/Module.php @@ -0,0 +1,11 @@ +belongsTo(House::class,'house_id', 'id'); + } + + public function paymentmode() + { + return $this->belongsto(PaymentMode::class,'payment_modes_id', 'id'); + } + + public function resident() + { + return $this->belongsTo(Resident::class); + } + + public function scopeMonthlyfilter($query, $month) + { + return $query->where('billingmonth', $month)->get(); + } + + public function scopeDatebetween($query, $start, $end) + { + return $query->whereBetween( + \DB::raw("STR_TO_DATE(dateofdeposit, '%d-%m-%Y')"), + [date('Y-m-d', strtotime($start)), date('Y-m-d', strtotime($end))] + )->get(); + } + + public function scopesortedData($query, $payments) + { + return $query->select('payments.*', 'houses.full_address') + ->whereIn('payments.id', $payments) + ->join('houses', 'payments.house_id', '=', 'houses.id') + ->orderBy('houses.block1', 'ASC') + ->orderBy('houses.block2', 'ASC') + ->orderBy('houses.house_no', 'ASC'); + } + + public function scopeSort($query, $sort) + { + if($sort == 'Ascending') + { + return $query->orderBy('dateofdeposit', 'asc')->get(); + } + return $query->orderBy('dateofdeposit', 'desc')->get(); + } + + public function Owner() + { + return $this->hasOneThrough( + User::class, + Resident::class, + 'house_id', + 'id', + 'house_id', + 'user_id' + ); + } +} diff --git a/backup/app/Models@20230511/PaymentMode.php b/backup/app/Models@20230511/PaymentMode.php new file mode 100644 index 0000000..b153cf0 --- /dev/null +++ b/backup/app/Models@20230511/PaymentMode.php @@ -0,0 +1,12 @@ +where('user_id', $record['user_id']) + ->where('house_id', $record['house_id']) + ->where('isOwner', $record['isOwner']); + } + + public function user() + { + return $this->belongsTo(User::class); + } + + public function house() + { + return $this->belongsTo(House::class); + } + + public function payments() + { + return $this->hasMany(Payment::class); + } + +} diff --git a/backup/app/Models@20230511/Society.php b/backup/app/Models@20230511/Society.php new file mode 100644 index 0000000..1748f14 --- /dev/null +++ b/backup/app/Models@20230511/Society.php @@ -0,0 +1,19 @@ + + */ + protected $fillable = [ + 'name', + 'email', + 'password', + 'mobile1', + 'mobile2', + 'usertype_id', + 'user_image' + ]; + + /** + * The attributes that should be hidden for serialization. + * + * @var array + */ + protected $hidden = [ + 'password', + 'remember_token', + ]; + + /** + * The attributes that should be cast. + * + * @var array + */ + protected $casts = [ + 'email_verified_at' => 'datetime', + ]; + + public function usertype() + { + return $this->belongsTo(Usertype::class); + } + + public function houses() + { + return $this->belongsToMany(House::class, 'residents')->withPivot('isOwner', 'datofoccupancy'); + } + + public function residents() + { + return $this->hasMany(Resident::class); + } + + public function payments() + { + return $this->hasManyThrough(Payment::class, Resident::class,'user_id', 'house_id', 'id','house_id'); + } + + public function scopesearch($query, $search) + { + return $query->where('name', 'Like' ,$search.'%') + ->orwhere('mobile1', 'Like', '%'.$search.'%')->get(); + } +} diff --git a/backup/app/Models@20230511/Usertype.php b/backup/app/Models@20230511/Usertype.php new file mode 100644 index 0000000..f7d8bc8 --- /dev/null +++ b/backup/app/Models@20230511/Usertype.php @@ -0,0 +1,13 @@ +user =$user; + } + + /** + * Get the notification's delivery channels. + * + * @return array + */ + public function via(object $notifiable): array + { + return ['mail','database']; + } + + /** + * Get the mail representation of the notification. + */ + public function toMail($notifiable) + { + return (new MailMessage) + ->line($this->user->name.' Click on the following link to reset your password :') + ->action('Reset Password', route('forget', $notifiable->id)) + ->salutation('Regards, Society Team'); + + } + + /** + * Get the array representation of the notification. + * + * @return array + */ + public function toArray(object $notifiable): array + { + return [ + // + ]; + } +} diff --git a/backup/app/Providers/AppServiceProvider.php b/backup/app/Providers/AppServiceProvider.php new file mode 100644 index 0000000..452e6b6 --- /dev/null +++ b/backup/app/Providers/AppServiceProvider.php @@ -0,0 +1,24 @@ + + */ + protected $policies = [ + // 'App\Models\Model' => 'App\Policies\ModelPolicy', + ]; + + /** + * Register any authentication / authorization services. + */ + public function boot(): void + { + // + } +} diff --git a/backup/app/Providers/BroadcastServiceProvider.php b/backup/app/Providers/BroadcastServiceProvider.php new file mode 100644 index 0000000..2be04f5 --- /dev/null +++ b/backup/app/Providers/BroadcastServiceProvider.php @@ -0,0 +1,19 @@ +> + */ + protected $listen = [ + Registered::class => [ + SendEmailVerificationNotification::class, + ], + ]; + + /** + * Register any events for your application. + */ + public function boot(): void + { + // + } + + /** + * Determine if events and listeners should be automatically discovered. + */ + public function shouldDiscoverEvents(): bool + { + return false; + } +} diff --git a/backup/app/Providers/RouteServiceProvider.php b/backup/app/Providers/RouteServiceProvider.php new file mode 100644 index 0000000..bc49109 --- /dev/null +++ b/backup/app/Providers/RouteServiceProvider.php @@ -0,0 +1,48 @@ +configureRateLimiting(); + + $this->routes(function () { + Route::middleware('api') + ->prefix('api') + ->group(base_path('routes/api.php')); + + Route::middleware('web') + ->group(base_path('routes/web.php')); + }); + } + + /** + * Configure the rate limiters for the application. + */ + protected function configureRateLimiting(): void + { + RateLimiter::for('api', function (Request $request) { + return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip()); + }); + } +} diff --git a/backup/artisan b/backup/artisan new file mode 100644 index 0000000..67a3329 --- /dev/null +++ b/backup/artisan @@ -0,0 +1,53 @@ +#!/usr/bin/env php +make(Illuminate\Contracts\Console\Kernel::class); + +$status = $kernel->handle( + $input = new Symfony\Component\Console\Input\ArgvInput, + new Symfony\Component\Console\Output\ConsoleOutput +); + +/* +|-------------------------------------------------------------------------- +| Shutdown The Application +|-------------------------------------------------------------------------- +| +| Once Artisan has finished running, we will fire off the shutdown events +| so that any final work may be done by the application before we shut +| down the process. This is the last thing to happen to the request. +| +*/ + +$kernel->terminate($input, $status); + +exit($status); diff --git a/backup/bootstrap/app.php b/backup/bootstrap/app.php new file mode 100644 index 0000000..037e17d --- /dev/null +++ b/backup/bootstrap/app.php @@ -0,0 +1,55 @@ +singleton( + Illuminate\Contracts\Http\Kernel::class, + App\Http\Kernel::class +); + +$app->singleton( + Illuminate\Contracts\Console\Kernel::class, + App\Console\Kernel::class +); + +$app->singleton( + Illuminate\Contracts\Debug\ExceptionHandler::class, + App\Exceptions\Handler::class +); + +/* +|-------------------------------------------------------------------------- +| Return The Application +|-------------------------------------------------------------------------- +| +| This script returns the application instance. The instance is given to +| the calling script so we can separate the building of the instances +| from the actual running of the application and sending responses. +| +*/ + +return $app; diff --git a/storage/framework/cache/data/.gitignore b/backup/bootstrap/cache/.gitignore similarity index 100% rename from storage/framework/cache/data/.gitignore rename to backup/bootstrap/cache/.gitignore diff --git a/backup/composer.json b/backup/composer.json new file mode 100644 index 0000000..4958668 --- /dev/null +++ b/backup/composer.json @@ -0,0 +1,66 @@ +{ + "name": "laravel/laravel", + "type": "project", + "description": "The Laravel Framework.", + "keywords": ["framework", "laravel"], + "license": "MIT", + "require": { + "php": "^8.1", + "guzzlehttp/guzzle": "^7.2", + "laravel/framework": "^10.0", + "laravel/sanctum": "^3.2", + "laravel/tinker": "^2.8" + }, + "require-dev": { + "fakerphp/faker": "^1.9.1", + "laravel/pint": "^1.0", + "laravel/sail": "^1.18", + "mockery/mockery": "^1.4.4", + "nunomaduro/collision": "^7.0", + "phpunit/phpunit": "^10.0", + "spatie/laravel-ignition": "^2.0" + }, + "autoload": { + "psr-4": { + "App\\": "app/", + "Database\\Factories\\": "database/factories/", + "Database\\Seeders\\": "database/seeders/" + } + }, + "autoload-dev": { + "psr-4": { + "Tests\\": "tests/" + } + }, + "scripts": { + "post-autoload-dump": [ + "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", + "@php artisan package:discover --ansi" + ], + "post-update-cmd": [ + "@php artisan vendor:publish --tag=laravel-assets --ansi --force" + ], + "post-root-package-install": [ + "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" + ], + "post-create-project-cmd": [ + "@php artisan key:generate --ansi" + ] + }, + "extra": { + "laravel": { + "dont-discover": [] + } + }, + "config": { + "optimize-autoloader": true, + "preferred-install": "dist", + "sort-packages": true, + "allow-plugins": { + "pestphp/pest-plugin": true, + "php-http/discovery": true + } + }, + "minimum-stability": "stable", + "prefer-stable": true +} diff --git a/backup/composer.lock b/backup/composer.lock new file mode 100644 index 0000000..1f6663a --- /dev/null +++ b/backup/composer.lock @@ -0,0 +1,7828 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "121ea3a2fffe49b3ef9aa4d064b28c19", + "packages": [ + { + "name": "brick/math", + "version": "0.10.2", + "source": { + "type": "git", + "url": "https://github.com/brick/math.git", + "reference": "459f2781e1a08d52ee56b0b1444086e038561e3f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/brick/math/zipball/459f2781e1a08d52ee56b0b1444086e038561e3f", + "reference": "459f2781e1a08d52ee56b0b1444086e038561e3f", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.2", + "phpunit/phpunit": "^9.0", + "vimeo/psalm": "4.25.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Brick\\Math\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Arbitrary-precision arithmetic library", + "keywords": [ + "Arbitrary-precision", + "BigInteger", + "BigRational", + "arithmetic", + "bigdecimal", + "bignum", + "brick", + "math" + ], + "support": { + "issues": "https://github.com/brick/math/issues", + "source": "https://github.com/brick/math/tree/0.10.2" + }, + "funding": [ + { + "url": "https://github.com/BenMorel", + "type": "github" + } + ], + "time": "2022-08-10T22:54:19+00:00" + }, + { + "name": "dflydev/dot-access-data", + "version": "v3.0.2", + "source": { + "type": "git", + "url": "https://github.com/dflydev/dflydev-dot-access-data.git", + "reference": "f41715465d65213d644d3141a6a93081be5d3549" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dflydev/dflydev-dot-access-data/zipball/f41715465d65213d644d3141a6a93081be5d3549", + "reference": "f41715465d65213d644d3141a6a93081be5d3549", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.42", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.3", + "scrutinizer/ocular": "1.6.0", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "^4.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Dflydev\\DotAccessData\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dragonfly Development Inc.", + "email": "info@dflydev.com", + "homepage": "http://dflydev.com" + }, + { + "name": "Beau Simensen", + "email": "beau@dflydev.com", + "homepage": "http://beausimensen.com" + }, + { + "name": "Carlos Frutos", + "email": "carlos@kiwing.it", + "homepage": "https://github.com/cfrutos" + }, + { + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com" + } + ], + "description": "Given a deep data structure, access data by dot notation.", + "homepage": "https://github.com/dflydev/dflydev-dot-access-data", + "keywords": [ + "access", + "data", + "dot", + "notation" + ], + "support": { + "issues": "https://github.com/dflydev/dflydev-dot-access-data/issues", + "source": "https://github.com/dflydev/dflydev-dot-access-data/tree/v3.0.2" + }, + "time": "2022-10-27T11:44:00+00:00" + }, + { + "name": "doctrine/inflector", + "version": "2.0.6", + "source": { + "type": "git", + "url": "https://github.com/doctrine/inflector.git", + "reference": "d9d313a36c872fd6ee06d9a6cbcf713eaa40f024" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/d9d313a36c872fd6ee06d9a6cbcf713eaa40f024", + "reference": "d9d313a36c872fd6ee06d9a6cbcf713eaa40f024", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^10", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpstan/phpstan-strict-rules": "^1.3", + "phpunit/phpunit": "^8.5 || ^9.5", + "vimeo/psalm": "^4.25" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Inflector\\": "lib/Doctrine/Inflector" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.", + "homepage": "https://www.doctrine-project.org/projects/inflector.html", + "keywords": [ + "inflection", + "inflector", + "lowercase", + "manipulation", + "php", + "plural", + "singular", + "strings", + "uppercase", + "words" + ], + "support": { + "issues": "https://github.com/doctrine/inflector/issues", + "source": "https://github.com/doctrine/inflector/tree/2.0.6" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finflector", + "type": "tidelift" + } + ], + "time": "2022-10-20T09:10:12+00:00" + }, + { + "name": "doctrine/lexer", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "84a527db05647743d50373e0ec53a152f2cde568" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/84a527db05647743d50373e0ec53a152f2cde568", + "reference": "84a527db05647743d50373e0ec53a152f2cde568", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "require-dev": { + "doctrine/coding-standard": "^10", + "phpstan/phpstan": "^1.9", + "phpunit/phpunit": "^9.5", + "psalm/plugin-phpunit": "^0.18.3", + "vimeo/psalm": "^5.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Lexer\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "keywords": [ + "annotations", + "docblock", + "lexer", + "parser", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/lexer/issues", + "source": "https://github.com/doctrine/lexer/tree/3.0.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" + } + ], + "time": "2022-12-15T16:57:16+00:00" + }, + { + "name": "dragonmantank/cron-expression", + "version": "v3.3.2", + "source": { + "type": "git", + "url": "https://github.com/dragonmantank/cron-expression.git", + "reference": "782ca5968ab8b954773518e9e49a6f892a34b2a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/782ca5968ab8b954773518e9e49a6f892a34b2a8", + "reference": "782ca5968ab8b954773518e9e49a6f892a34b2a8", + "shasum": "" + }, + "require": { + "php": "^7.2|^8.0", + "webmozart/assert": "^1.0" + }, + "replace": { + "mtdowling/cron-expression": "^1.0" + }, + "require-dev": { + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-webmozart-assert": "^1.0", + "phpunit/phpunit": "^7.0|^8.0|^9.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Cron\\": "src/Cron/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Chris Tankersley", + "email": "chris@ctankersley.com", + "homepage": "https://github.com/dragonmantank" + } + ], + "description": "CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due", + "keywords": [ + "cron", + "schedule" + ], + "support": { + "issues": "https://github.com/dragonmantank/cron-expression/issues", + "source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.2" + }, + "funding": [ + { + "url": "https://github.com/dragonmantank", + "type": "github" + } + ], + "time": "2022-09-10T18:51:20+00:00" + }, + { + "name": "egulias/email-validator", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/egulias/EmailValidator.git", + "reference": "3a85486b709bc384dae8eb78fb2eec649bdb64ff" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/3a85486b709bc384dae8eb78fb2eec649bdb64ff", + "reference": "3a85486b709bc384dae8eb78fb2eec649bdb64ff", + "shasum": "" + }, + "require": { + "doctrine/lexer": "^2.0 || ^3.0", + "php": ">=8.1", + "symfony/polyfill-intl-idn": "^1.26" + }, + "require-dev": { + "phpunit/phpunit": "^9.5.27", + "vimeo/psalm": "^4.30" + }, + "suggest": { + "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Egulias\\EmailValidator\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eduardo Gulias Davis" + } + ], + "description": "A library for validating emails against several RFCs", + "homepage": "https://github.com/egulias/EmailValidator", + "keywords": [ + "email", + "emailvalidation", + "emailvalidator", + "validation", + "validator" + ], + "support": { + "issues": "https://github.com/egulias/EmailValidator/issues", + "source": "https://github.com/egulias/EmailValidator/tree/4.0.1" + }, + "funding": [ + { + "url": "https://github.com/egulias", + "type": "github" + } + ], + "time": "2023-01-14T14:17:03+00:00" + }, + { + "name": "fruitcake/php-cors", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/fruitcake/php-cors.git", + "reference": "58571acbaa5f9f462c9c77e911700ac66f446d4e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/fruitcake/php-cors/zipball/58571acbaa5f9f462c9c77e911700ac66f446d4e", + "reference": "58571acbaa5f9f462c9c77e911700ac66f446d4e", + "shasum": "" + }, + "require": { + "php": "^7.4|^8.0", + "symfony/http-foundation": "^4.4|^5.4|^6" + }, + "require-dev": { + "phpstan/phpstan": "^1.4", + "phpunit/phpunit": "^9", + "squizlabs/php_codesniffer": "^3.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "Fruitcake\\Cors\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fruitcake", + "homepage": "https://fruitcake.nl" + }, + { + "name": "Barryvdh", + "email": "barryvdh@gmail.com" + } + ], + "description": "Cross-origin resource sharing library for the Symfony HttpFoundation", + "homepage": "https://github.com/fruitcake/php-cors", + "keywords": [ + "cors", + "laravel", + "symfony" + ], + "support": { + "issues": "https://github.com/fruitcake/php-cors/issues", + "source": "https://github.com/fruitcake/php-cors/tree/v1.2.0" + }, + "funding": [ + { + "url": "https://fruitcake.nl", + "type": "custom" + }, + { + "url": "https://github.com/barryvdh", + "type": "github" + } + ], + "time": "2022-02-20T15:07:15+00:00" + }, + { + "name": "graham-campbell/result-type", + "version": "v1.1.1", + "source": { + "type": "git", + "url": "https://github.com/GrahamCampbell/Result-Type.git", + "reference": "672eff8cf1d6fe1ef09ca0f89c4b287d6a3eb831" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/672eff8cf1d6fe1ef09ca0f89c4b287d6a3eb831", + "reference": "672eff8cf1d6fe1ef09ca0f89c4b287d6a3eb831", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9.1" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.32 || ^9.6.3 || ^10.0.12" + }, + "type": "library", + "autoload": { + "psr-4": { + "GrahamCampbell\\ResultType\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + } + ], + "description": "An Implementation Of The Result Type", + "keywords": [ + "Graham Campbell", + "GrahamCampbell", + "Result Type", + "Result-Type", + "result" + ], + "support": { + "issues": "https://github.com/GrahamCampbell/Result-Type/issues", + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.1" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/graham-campbell/result-type", + "type": "tidelift" + } + ], + "time": "2023-02-25T20:23:15+00:00" + }, + { + "name": "guzzlehttp/guzzle", + "version": "7.5.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b50a2a1251152e43f6a37f0fa053e730a67d25ba", + "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^1.5", + "guzzlehttp/psr7": "^1.9 || ^2.4", + "php": "^7.2.5 || ^8.0", + "psr/http-client": "^1.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" + }, + "provide": { + "psr/http-client-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.1", + "ext-curl": "*", + "php-http/client-integration-tests": "^3.0", + "phpunit/phpunit": "^8.5.29 || ^9.5.23", + "psr/log": "^1.1 || ^2.0 || ^3.0" + }, + "suggest": { + "ext-curl": "Required for CURL handler support", + "ext-intl": "Required for Internationalized Domain Name (IDN) support", + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, + "branch-alias": { + "dev-master": "7.5-dev" + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "psr-18", + "psr-7", + "rest", + "web service" + ], + "support": { + "issues": "https://github.com/guzzle/guzzle/issues", + "source": "https://github.com/guzzle/guzzle/tree/7.5.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", + "type": "tidelift" + } + ], + "time": "2022-08-28T15:39:27+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "1.5.2", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "b94b2807d85443f9719887892882d0329d1e2598" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/b94b2807d85443f9719887892882d0329d1e2598", + "reference": "b94b2807d85443f9719887892882d0329d1e2598", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "symfony/phpunit-bridge": "^4.4 || ^5.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.5-dev" + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "support": { + "issues": "https://github.com/guzzle/promises/issues", + "source": "https://github.com/guzzle/promises/tree/1.5.2" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", + "type": "tidelift" + } + ], + "time": "2022-08-28T14:55:35+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "2.4.4", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "3cf1b6d4f0c820a2cf8bcaec39fc698f3443b5cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/3cf1b6d4f0c820a2cf8bcaec39fc698f3443b5cf", + "reference": "3cf1b6d4f0c820a2cf8bcaec39fc698f3443b5cf", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.0", + "ralouphie/getallheaders": "^3.0" + }, + "provide": { + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.1", + "http-interop/http-factory-tests": "^0.9", + "phpunit/phpunit": "^8.5.29 || ^9.5.23" + }, + "suggest": { + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, + "branch-alias": { + "dev-master": "2.4-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "support": { + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/2.4.4" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", + "type": "tidelift" + } + ], + "time": "2023-03-09T13:19:02+00:00" + }, + { + "name": "guzzlehttp/uri-template", + "version": "v1.0.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/uri-template.git", + "reference": "b945d74a55a25a949158444f09ec0d3c120d69e2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/uri-template/zipball/b945d74a55a25a949158444f09ec0d3c120d69e2", + "reference": "b945d74a55a25a949158444f09ec0d3c120d69e2", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "symfony/polyfill-php80": "^1.17" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.19 || ^9.5.8", + "uri-template/tests": "1.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\UriTemplate\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + } + ], + "description": "A polyfill class for uri_template of PHP", + "keywords": [ + "guzzlehttp", + "uri-template" + ], + "support": { + "issues": "https://github.com/guzzle/uri-template/issues", + "source": "https://github.com/guzzle/uri-template/tree/v1.0.1" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/uri-template", + "type": "tidelift" + } + ], + "time": "2021-10-07T12:57:01+00:00" + }, + { + "name": "laravel/framework", + "version": "v10.5.1", + "source": { + "type": "git", + "url": "https://github.com/laravel/framework.git", + "reference": "485f22333e8c1dff5bae0fe0421c1e2e139713de" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/framework/zipball/485f22333e8c1dff5bae0fe0421c1e2e139713de", + "reference": "485f22333e8c1dff5bae0fe0421c1e2e139713de", + "shasum": "" + }, + "require": { + "brick/math": "^0.9.3|^0.10.2|^0.11", + "composer-runtime-api": "^2.2", + "doctrine/inflector": "^2.0.5", + "dragonmantank/cron-expression": "^3.3.2", + "egulias/email-validator": "^3.2.1|^4.0", + "ext-ctype": "*", + "ext-filter": "*", + "ext-hash": "*", + "ext-mbstring": "*", + "ext-openssl": "*", + "ext-session": "*", + "ext-tokenizer": "*", + "fruitcake/php-cors": "^1.2", + "guzzlehttp/uri-template": "^1.0", + "laravel/serializable-closure": "^1.3", + "league/commonmark": "^2.2.1", + "league/flysystem": "^3.8.0", + "monolog/monolog": "^3.0", + "nesbot/carbon": "^2.62.1", + "nunomaduro/termwind": "^1.13", + "php": "^8.1", + "psr/container": "^1.1.1|^2.0.1", + "psr/log": "^1.0|^2.0|^3.0", + "psr/simple-cache": "^1.0|^2.0|^3.0", + "ramsey/uuid": "^4.7", + "symfony/console": "^6.2", + "symfony/error-handler": "^6.2", + "symfony/finder": "^6.2", + "symfony/http-foundation": "^6.2", + "symfony/http-kernel": "^6.2", + "symfony/mailer": "^6.2", + "symfony/mime": "^6.2", + "symfony/process": "^6.2", + "symfony/routing": "^6.2", + "symfony/uid": "^6.2", + "symfony/var-dumper": "^6.2", + "tijsverkoyen/css-to-inline-styles": "^2.2.5", + "vlucas/phpdotenv": "^5.4.1", + "voku/portable-ascii": "^2.0" + }, + "conflict": { + "tightenco/collect": "<5.5.33" + }, + "provide": { + "psr/container-implementation": "1.1|2.0", + "psr/simple-cache-implementation": "1.0|2.0|3.0" + }, + "replace": { + "illuminate/auth": "self.version", + "illuminate/broadcasting": "self.version", + "illuminate/bus": "self.version", + "illuminate/cache": "self.version", + "illuminate/collections": "self.version", + "illuminate/conditionable": "self.version", + "illuminate/config": "self.version", + "illuminate/console": "self.version", + "illuminate/container": "self.version", + "illuminate/contracts": "self.version", + "illuminate/cookie": "self.version", + "illuminate/database": "self.version", + "illuminate/encryption": "self.version", + "illuminate/events": "self.version", + "illuminate/filesystem": "self.version", + "illuminate/hashing": "self.version", + "illuminate/http": "self.version", + "illuminate/log": "self.version", + "illuminate/macroable": "self.version", + "illuminate/mail": "self.version", + "illuminate/notifications": "self.version", + "illuminate/pagination": "self.version", + "illuminate/pipeline": "self.version", + "illuminate/process": "self.version", + "illuminate/queue": "self.version", + "illuminate/redis": "self.version", + "illuminate/routing": "self.version", + "illuminate/session": "self.version", + "illuminate/support": "self.version", + "illuminate/testing": "self.version", + "illuminate/translation": "self.version", + "illuminate/validation": "self.version", + "illuminate/view": "self.version" + }, + "require-dev": { + "ably/ably-php": "^1.0", + "aws/aws-sdk-php": "^3.235.5", + "doctrine/dbal": "^3.5.1", + "ext-gmp": "*", + "fakerphp/faker": "^1.21", + "guzzlehttp/guzzle": "^7.5", + "league/flysystem-aws-s3-v3": "^3.0", + "league/flysystem-ftp": "^3.0", + "league/flysystem-path-prefixing": "^3.3", + "league/flysystem-read-only": "^3.3", + "league/flysystem-sftp-v3": "^3.0", + "mockery/mockery": "^1.5.1", + "orchestra/testbench-core": "^8.1", + "pda/pheanstalk": "^4.0", + "phpstan/phpdoc-parser": "^1.15", + "phpstan/phpstan": "^1.4.7", + "phpunit/phpunit": "^10.0.7", + "predis/predis": "^2.0.2", + "symfony/cache": "^6.2", + "symfony/http-client": "^6.2.4" + }, + "suggest": { + "ably/ably-php": "Required to use the Ably broadcast driver (^1.0).", + "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage, and SES mail driver (^3.235.5).", + "brianium/paratest": "Required to run tests in parallel (^6.0).", + "doctrine/dbal": "Required to rename columns and drop SQLite columns (^3.5.1).", + "ext-apcu": "Required to use the APC cache driver.", + "ext-fileinfo": "Required to use the Filesystem class.", + "ext-ftp": "Required to use the Flysystem FTP driver.", + "ext-gd": "Required to use Illuminate\\Http\\Testing\\FileFactory::image().", + "ext-memcached": "Required to use the memcache cache driver.", + "ext-pcntl": "Required to use all features of the queue worker and console signal trapping.", + "ext-pdo": "Required to use all database features.", + "ext-posix": "Required to use all features of the queue worker.", + "ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0).", + "fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).", + "filp/whoops": "Required for friendly error pages in development (^2.14.3).", + "guzzlehttp/guzzle": "Required to use the HTTP Client and the ping methods on schedules (^7.5).", + "laravel/tinker": "Required to use the tinker console command (^2.0).", + "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^3.0).", + "league/flysystem-ftp": "Required to use the Flysystem FTP driver (^3.0).", + "league/flysystem-path-prefixing": "Required to use the scoped driver (^3.3).", + "league/flysystem-read-only": "Required to use read-only disks (^3.3)", + "league/flysystem-sftp-v3": "Required to use the Flysystem SFTP driver (^3.0).", + "mockery/mockery": "Required to use mocking (^1.5.1).", + "nyholm/psr7": "Required to use PSR-7 bridging features (^1.2).", + "pda/pheanstalk": "Required to use the beanstalk queue driver (^4.0).", + "phpunit/phpunit": "Required to use assertions and run tests (^9.5.8|^10.0.7).", + "predis/predis": "Required to use the predis connector (^2.0.2).", + "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", + "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^6.0|^7.0).", + "symfony/cache": "Required to PSR-6 cache bridge (^6.2).", + "symfony/filesystem": "Required to enable support for relative symbolic links (^6.2).", + "symfony/http-client": "Required to enable support for the Symfony API mail transports (^6.2).", + "symfony/mailgun-mailer": "Required to enable support for the Mailgun mail transport (^6.2).", + "symfony/postmark-mailer": "Required to enable support for the Postmark mail transport (^6.2).", + "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^2.0)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "10.x-dev" + } + }, + "autoload": { + "files": [ + "src/Illuminate/Collections/helpers.php", + "src/Illuminate/Events/functions.php", + "src/Illuminate/Foundation/helpers.php", + "src/Illuminate/Support/helpers.php" + ], + "psr-4": { + "Illuminate\\": "src/Illuminate/", + "Illuminate\\Support\\": [ + "src/Illuminate/Macroable/", + "src/Illuminate/Collections/", + "src/Illuminate/Conditionable/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Laravel Framework.", + "homepage": "https://laravel.com", + "keywords": [ + "framework", + "laravel" + ], + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2023-03-29T15:09:16+00:00" + }, + { + "name": "laravel/sanctum", + "version": "v3.2.1", + "source": { + "type": "git", + "url": "https://github.com/laravel/sanctum.git", + "reference": "d09d69bac55708fcd4a3b305d760e673d888baf9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/sanctum/zipball/d09d69bac55708fcd4a3b305d760e673d888baf9", + "reference": "d09d69bac55708fcd4a3b305d760e673d888baf9", + "shasum": "" + }, + "require": { + "ext-json": "*", + "illuminate/console": "^9.21|^10.0", + "illuminate/contracts": "^9.21|^10.0", + "illuminate/database": "^9.21|^10.0", + "illuminate/support": "^9.21|^10.0", + "php": "^8.0.2" + }, + "require-dev": { + "mockery/mockery": "^1.0", + "orchestra/testbench": "^7.0|^8.0", + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + }, + "laravel": { + "providers": [ + "Laravel\\Sanctum\\SanctumServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Laravel\\Sanctum\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Laravel Sanctum provides a featherweight authentication system for SPAs and simple APIs.", + "keywords": [ + "auth", + "laravel", + "sanctum" + ], + "support": { + "issues": "https://github.com/laravel/sanctum/issues", + "source": "https://github.com/laravel/sanctum" + }, + "time": "2023-01-13T15:41:49+00:00" + }, + { + "name": "laravel/serializable-closure", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/laravel/serializable-closure.git", + "reference": "f23fe9d4e95255dacee1bf3525e0810d1a1b0f37" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/f23fe9d4e95255dacee1bf3525e0810d1a1b0f37", + "reference": "f23fe9d4e95255dacee1bf3525e0810d1a1b0f37", + "shasum": "" + }, + "require": { + "php": "^7.3|^8.0" + }, + "require-dev": { + "nesbot/carbon": "^2.61", + "pestphp/pest": "^1.21.3", + "phpstan/phpstan": "^1.8.2", + "symfony/var-dumper": "^5.4.11" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Laravel\\SerializableClosure\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + }, + { + "name": "Nuno Maduro", + "email": "nuno@laravel.com" + } + ], + "description": "Laravel Serializable Closure provides an easy and secure way to serialize closures in PHP.", + "keywords": [ + "closure", + "laravel", + "serializable" + ], + "support": { + "issues": "https://github.com/laravel/serializable-closure/issues", + "source": "https://github.com/laravel/serializable-closure" + }, + "time": "2023-01-30T18:31:20+00:00" + }, + { + "name": "laravel/tinker", + "version": "v2.8.1", + "source": { + "type": "git", + "url": "https://github.com/laravel/tinker.git", + "reference": "04a2d3bd0d650c0764f70bf49d1ee39393e4eb10" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/tinker/zipball/04a2d3bd0d650c0764f70bf49d1ee39393e4eb10", + "reference": "04a2d3bd0d650c0764f70bf49d1ee39393e4eb10", + "shasum": "" + }, + "require": { + "illuminate/console": "^6.0|^7.0|^8.0|^9.0|^10.0", + "illuminate/contracts": "^6.0|^7.0|^8.0|^9.0|^10.0", + "illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0", + "php": "^7.2.5|^8.0", + "psy/psysh": "^0.10.4|^0.11.1", + "symfony/var-dumper": "^4.3.4|^5.0|^6.0" + }, + "require-dev": { + "mockery/mockery": "~1.3.3|^1.4.2", + "phpunit/phpunit": "^8.5.8|^9.3.3" + }, + "suggest": { + "illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0|^9.0|^10.0)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + }, + "laravel": { + "providers": [ + "Laravel\\Tinker\\TinkerServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Laravel\\Tinker\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Powerful REPL for the Laravel framework.", + "keywords": [ + "REPL", + "Tinker", + "laravel", + "psysh" + ], + "support": { + "issues": "https://github.com/laravel/tinker/issues", + "source": "https://github.com/laravel/tinker/tree/v2.8.1" + }, + "time": "2023-02-15T16:40:09+00:00" + }, + { + "name": "league/commonmark", + "version": "2.4.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/commonmark.git", + "reference": "d44a24690f16b8c1808bf13b1bd54ae4c63ea048" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/d44a24690f16b8c1808bf13b1bd54ae4c63ea048", + "reference": "d44a24690f16b8c1808bf13b1bd54ae4c63ea048", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "league/config": "^1.1.1", + "php": "^7.4 || ^8.0", + "psr/event-dispatcher": "^1.0", + "symfony/deprecation-contracts": "^2.1 || ^3.0", + "symfony/polyfill-php80": "^1.16" + }, + "require-dev": { + "cebe/markdown": "^1.0", + "commonmark/cmark": "0.30.0", + "commonmark/commonmark.js": "0.30.0", + "composer/package-versions-deprecated": "^1.8", + "embed/embed": "^4.4", + "erusev/parsedown": "^1.0", + "ext-json": "*", + "github/gfm": "0.29.0", + "michelf/php-markdown": "^1.4 || ^2.0", + "nyholm/psr7": "^1.5", + "phpstan/phpstan": "^1.8.2", + "phpunit/phpunit": "^9.5.21", + "scrutinizer/ocular": "^1.8.1", + "symfony/finder": "^5.3 | ^6.0", + "symfony/yaml": "^2.3 | ^3.0 | ^4.0 | ^5.0 | ^6.0", + "unleashedtech/php-coding-standard": "^3.1.1", + "vimeo/psalm": "^4.24.0 || ^5.0.0" + }, + "suggest": { + "symfony/yaml": "v2.3+ required if using the Front Matter extension" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.5-dev" + } + }, + "autoload": { + "psr-4": { + "League\\CommonMark\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com", + "role": "Lead Developer" + } + ], + "description": "Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)", + "homepage": "https://commonmark.thephpleague.com", + "keywords": [ + "commonmark", + "flavored", + "gfm", + "github", + "github-flavored", + "markdown", + "md", + "parser" + ], + "support": { + "docs": "https://commonmark.thephpleague.com/", + "forum": "https://github.com/thephpleague/commonmark/discussions", + "issues": "https://github.com/thephpleague/commonmark/issues", + "rss": "https://github.com/thephpleague/commonmark/releases.atom", + "source": "https://github.com/thephpleague/commonmark" + }, + "funding": [ + { + "url": "https://www.colinodell.com/sponsor", + "type": "custom" + }, + { + "url": "https://www.paypal.me/colinpodell/10.00", + "type": "custom" + }, + { + "url": "https://github.com/colinodell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/league/commonmark", + "type": "tidelift" + } + ], + "time": "2023-03-24T15:16:10+00:00" + }, + { + "name": "league/config", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/config.git", + "reference": "754b3604fb2984c71f4af4a9cbe7b57f346ec1f3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/config/zipball/754b3604fb2984c71f4af4a9cbe7b57f346ec1f3", + "reference": "754b3604fb2984c71f4af4a9cbe7b57f346ec1f3", + "shasum": "" + }, + "require": { + "dflydev/dot-access-data": "^3.0.1", + "nette/schema": "^1.2", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.8.2", + "phpunit/phpunit": "^9.5.5", + "scrutinizer/ocular": "^1.8.1", + "unleashedtech/php-coding-standard": "^3.1", + "vimeo/psalm": "^4.7.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Config\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com", + "role": "Lead Developer" + } + ], + "description": "Define configuration arrays with strict schemas and access values with dot notation", + "homepage": "https://config.thephpleague.com", + "keywords": [ + "array", + "config", + "configuration", + "dot", + "dot-access", + "nested", + "schema" + ], + "support": { + "docs": "https://config.thephpleague.com/", + "issues": "https://github.com/thephpleague/config/issues", + "rss": "https://github.com/thephpleague/config/releases.atom", + "source": "https://github.com/thephpleague/config" + }, + "funding": [ + { + "url": "https://www.colinodell.com/sponsor", + "type": "custom" + }, + { + "url": "https://www.paypal.me/colinpodell/10.00", + "type": "custom" + }, + { + "url": "https://github.com/colinodell", + "type": "github" + } + ], + "time": "2022-12-11T20:36:23+00:00" + }, + { + "name": "league/flysystem", + "version": "3.12.3", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem.git", + "reference": "81e87e74dd5213795c7846d65089712d2dda90ce" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/81e87e74dd5213795c7846d65089712d2dda90ce", + "reference": "81e87e74dd5213795c7846d65089712d2dda90ce", + "shasum": "" + }, + "require": { + "league/mime-type-detection": "^1.0.0", + "php": "^8.0.2" + }, + "conflict": { + "aws/aws-sdk-php": "3.209.31 || 3.210.0", + "guzzlehttp/guzzle": "<7.0", + "guzzlehttp/ringphp": "<1.1.1", + "phpseclib/phpseclib": "3.0.15", + "symfony/http-client": "<5.2" + }, + "require-dev": { + "async-aws/s3": "^1.5", + "async-aws/simple-s3": "^1.1", + "aws/aws-sdk-php": "^3.220.0", + "composer/semver": "^3.0", + "ext-fileinfo": "*", + "ext-ftp": "*", + "ext-zip": "*", + "friendsofphp/php-cs-fixer": "^3.5", + "google/cloud-storage": "^1.23", + "microsoft/azure-storage-blob": "^1.1", + "phpseclib/phpseclib": "^3.0.14", + "phpstan/phpstan": "^0.12.26", + "phpunit/phpunit": "^9.5.11", + "sabre/dav": "^4.3.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\Flysystem\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" + } + ], + "description": "File storage abstraction for PHP", + "keywords": [ + "WebDAV", + "aws", + "cloud", + "file", + "files", + "filesystem", + "filesystems", + "ftp", + "s3", + "sftp", + "storage" + ], + "support": { + "issues": "https://github.com/thephpleague/flysystem/issues", + "source": "https://github.com/thephpleague/flysystem/tree/3.12.3" + }, + "funding": [ + { + "url": "https://ecologi.com/frankdejonge", + "type": "custom" + }, + { + "url": "https://github.com/frankdejonge", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/league/flysystem", + "type": "tidelift" + } + ], + "time": "2023-02-18T15:32:41+00:00" + }, + { + "name": "league/mime-type-detection", + "version": "1.11.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/mime-type-detection.git", + "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ff6248ea87a9f116e78edd6002e39e5128a0d4dd", + "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.2", + "phpstan/phpstan": "^0.12.68", + "phpunit/phpunit": "^8.5.8 || ^9.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\MimeTypeDetection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" + } + ], + "description": "Mime-type detection for Flysystem", + "support": { + "issues": "https://github.com/thephpleague/mime-type-detection/issues", + "source": "https://github.com/thephpleague/mime-type-detection/tree/1.11.0" + }, + "funding": [ + { + "url": "https://github.com/frankdejonge", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/league/flysystem", + "type": "tidelift" + } + ], + "time": "2022-04-17T13:12:02+00:00" + }, + { + "name": "monolog/monolog", + "version": "3.3.1", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/monolog.git", + "reference": "9b5daeaffce5b926cac47923798bba91059e60e2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/9b5daeaffce5b926cac47923798bba91059e60e2", + "reference": "9b5daeaffce5b926cac47923798bba91059e60e2", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/log": "^2.0 || ^3.0" + }, + "provide": { + "psr/log-implementation": "3.0.0" + }, + "require-dev": { + "aws/aws-sdk-php": "^3.0", + "doctrine/couchdb": "~1.0@dev", + "elasticsearch/elasticsearch": "^7 || ^8", + "ext-json": "*", + "graylog2/gelf-php": "^1.4.2 || ^2@dev", + "guzzlehttp/guzzle": "^7.4.5", + "guzzlehttp/psr7": "^2.2", + "mongodb/mongodb": "^1.8", + "php-amqplib/php-amqplib": "~2.4 || ^3", + "phpstan/phpstan": "^1.9", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-strict-rules": "^1.4", + "phpunit/phpunit": "^9.5.26", + "predis/predis": "^1.1 || ^2", + "ruflin/elastica": "^7", + "symfony/mailer": "^5.4 || ^6", + "symfony/mime": "^5.4 || ^6" + }, + "suggest": { + "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", + "doctrine/couchdb": "Allow sending log messages to a CouchDB server", + "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client", + "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler", + "ext-mbstring": "Allow to work properly with unicode symbols", + "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)", + "ext-openssl": "Required to send log messages using SSL", + "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)", + "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", + "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", + "rollbar/rollbar": "Allow sending log messages to Rollbar", + "ruflin/elastica": "Allow sending log messages to an Elastic Search server" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Monolog\\": "src/Monolog" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "https://seld.be" + } + ], + "description": "Sends your logs to files, sockets, inboxes, databases and various web services", + "homepage": "https://github.com/Seldaek/monolog", + "keywords": [ + "log", + "logging", + "psr-3" + ], + "support": { + "issues": "https://github.com/Seldaek/monolog/issues", + "source": "https://github.com/Seldaek/monolog/tree/3.3.1" + }, + "funding": [ + { + "url": "https://github.com/Seldaek", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", + "type": "tidelift" + } + ], + "time": "2023-02-06T13:46:10+00:00" + }, + { + "name": "nesbot/carbon", + "version": "2.66.0", + "source": { + "type": "git", + "url": "https://github.com/briannesbitt/Carbon.git", + "reference": "496712849902241f04902033b0441b269effe001" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/496712849902241f04902033b0441b269effe001", + "reference": "496712849902241f04902033b0441b269effe001", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": "^7.1.8 || ^8.0", + "symfony/polyfill-mbstring": "^1.0", + "symfony/polyfill-php80": "^1.16", + "symfony/translation": "^3.4 || ^4.0 || ^5.0 || ^6.0" + }, + "require-dev": { + "doctrine/dbal": "^2.0 || ^3.1.4", + "doctrine/orm": "^2.7", + "friendsofphp/php-cs-fixer": "^3.0", + "kylekatarnls/multi-tester": "^2.0", + "ondrejmirtes/better-reflection": "*", + "phpmd/phpmd": "^2.9", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^0.12.99 || ^1.7.14", + "phpunit/php-file-iterator": "^2.0.5 || ^3.0.6", + "phpunit/phpunit": "^7.5.20 || ^8.5.26 || ^9.5.20", + "squizlabs/php_codesniffer": "^3.4" + }, + "bin": [ + "bin/carbon" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-3.x": "3.x-dev", + "dev-master": "2.x-dev" + }, + "laravel": { + "providers": [ + "Carbon\\Laravel\\ServiceProvider" + ] + }, + "phpstan": { + "includes": [ + "extension.neon" + ] + } + }, + "autoload": { + "psr-4": { + "Carbon\\": "src/Carbon/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brian Nesbitt", + "email": "brian@nesbot.com", + "homepage": "https://markido.com" + }, + { + "name": "kylekatarnls", + "homepage": "https://github.com/kylekatarnls" + } + ], + "description": "An API extension for DateTime that supports 281 different languages.", + "homepage": "https://carbon.nesbot.com", + "keywords": [ + "date", + "datetime", + "time" + ], + "support": { + "docs": "https://carbon.nesbot.com/docs", + "issues": "https://github.com/briannesbitt/Carbon/issues", + "source": "https://github.com/briannesbitt/Carbon" + }, + "funding": [ + { + "url": "https://github.com/sponsors/kylekatarnls", + "type": "github" + }, + { + "url": "https://opencollective.com/Carbon#sponsor", + "type": "opencollective" + }, + { + "url": "https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme", + "type": "tidelift" + } + ], + "time": "2023-01-29T18:53:47+00:00" + }, + { + "name": "nette/schema", + "version": "v1.2.3", + "source": { + "type": "git", + "url": "https://github.com/nette/schema.git", + "reference": "abbdbb70e0245d5f3bf77874cea1dfb0c930d06f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/schema/zipball/abbdbb70e0245d5f3bf77874cea1dfb0c930d06f", + "reference": "abbdbb70e0245d5f3bf77874cea1dfb0c930d06f", + "shasum": "" + }, + "require": { + "nette/utils": "^2.5.7 || ^3.1.5 || ^4.0", + "php": ">=7.1 <8.3" + }, + "require-dev": { + "nette/tester": "^2.3 || ^2.4", + "phpstan/phpstan-nette": "^1.0", + "tracy/tracy": "^2.7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0-only", + "GPL-3.0-only" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "📠Nette Schema: validating data structures against a given Schema.", + "homepage": "https://nette.org", + "keywords": [ + "config", + "nette" + ], + "support": { + "issues": "https://github.com/nette/schema/issues", + "source": "https://github.com/nette/schema/tree/v1.2.3" + }, + "time": "2022-10-13T01:24:26+00:00" + }, + { + "name": "nette/utils", + "version": "v4.0.0", + "source": { + "type": "git", + "url": "https://github.com/nette/utils.git", + "reference": "cacdbf5a91a657ede665c541eda28941d4b09c1e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/utils/zipball/cacdbf5a91a657ede665c541eda28941d4b09c1e", + "reference": "cacdbf5a91a657ede665c541eda28941d4b09c1e", + "shasum": "" + }, + "require": { + "php": ">=8.0 <8.3" + }, + "conflict": { + "nette/finder": "<3", + "nette/schema": "<1.2.2" + }, + "require-dev": { + "jetbrains/phpstorm-attributes": "dev-master", + "nette/tester": "^2.4", + "phpstan/phpstan": "^1.0", + "tracy/tracy": "^2.9" + }, + "suggest": { + "ext-gd": "to use Image", + "ext-iconv": "to use Strings::webalize(), toAscii(), chr() and reverse()", + "ext-intl": "to use Strings::webalize(), toAscii(), normalize() and compare()", + "ext-json": "to use Nette\\Utils\\Json", + "ext-mbstring": "to use Strings::lower() etc...", + "ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()", + "ext-xml": "to use Strings::length() etc. when mbstring is not available" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0-only", + "GPL-3.0-only" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.", + "homepage": "https://nette.org", + "keywords": [ + "array", + "core", + "datetime", + "images", + "json", + "nette", + "paginator", + "password", + "slugify", + "string", + "unicode", + "utf-8", + "utility", + "validation" + ], + "support": { + "issues": "https://github.com/nette/utils/issues", + "source": "https://github.com/nette/utils/tree/v4.0.0" + }, + "time": "2023-02-02T10:41:53+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.15.4", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6bb5176bc4af8bcb7d926f88718db9b96a2d4290", + "reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.4" + }, + "time": "2023-03-05T19:49:14+00:00" + }, + { + "name": "nunomaduro/termwind", + "version": "v1.15.1", + "source": { + "type": "git", + "url": "https://github.com/nunomaduro/termwind.git", + "reference": "8ab0b32c8caa4a2e09700ea32925441385e4a5dc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nunomaduro/termwind/zipball/8ab0b32c8caa4a2e09700ea32925441385e4a5dc", + "reference": "8ab0b32c8caa4a2e09700ea32925441385e4a5dc", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": "^8.0", + "symfony/console": "^5.3.0|^6.0.0" + }, + "require-dev": { + "ergebnis/phpstan-rules": "^1.0.", + "illuminate/console": "^8.0|^9.0", + "illuminate/support": "^8.0|^9.0", + "laravel/pint": "^1.0.0", + "pestphp/pest": "^1.21.0", + "pestphp/pest-plugin-mock": "^1.0", + "phpstan/phpstan": "^1.4.6", + "phpstan/phpstan-strict-rules": "^1.1.0", + "symfony/var-dumper": "^5.2.7|^6.0.0", + "thecodingmachine/phpstan-strict-rules": "^1.0.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Termwind\\Laravel\\TermwindServiceProvider" + ] + } + }, + "autoload": { + "files": [ + "src/Functions.php" + ], + "psr-4": { + "Termwind\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" + } + ], + "description": "Its like Tailwind CSS, but for the console.", + "keywords": [ + "cli", + "console", + "css", + "package", + "php", + "style" + ], + "support": { + "issues": "https://github.com/nunomaduro/termwind/issues", + "source": "https://github.com/nunomaduro/termwind/tree/v1.15.1" + }, + "funding": [ + { + "url": "https://www.paypal.com/paypalme/enunomaduro", + "type": "custom" + }, + { + "url": "https://github.com/nunomaduro", + "type": "github" + }, + { + "url": "https://github.com/xiCO2k", + "type": "github" + } + ], + "time": "2023-02-08T01:06:31+00:00" + }, + { + "name": "phpoption/phpoption", + "version": "1.9.1", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/php-option.git", + "reference": "dd3a383e599f49777d8b628dadbb90cae435b87e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/dd3a383e599f49777d8b628dadbb90cae435b87e", + "reference": "dd3a383e599f49777d8b628dadbb90cae435b87e", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.32 || ^9.6.3 || ^10.0.12" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": true + }, + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpOption\\": "src/PhpOption/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com", + "homepage": "https://github.com/schmittjoh" + }, + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + } + ], + "description": "Option Type for PHP", + "keywords": [ + "language", + "option", + "php", + "type" + ], + "support": { + "issues": "https://github.com/schmittjoh/php-option/issues", + "source": "https://github.com/schmittjoh/php-option/tree/1.9.1" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption", + "type": "tidelift" + } + ], + "time": "2023-02-25T19:38:58+00:00" + }, + { + "name": "psr/container", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "shasum": "" + }, + "require": { + "php": ">=7.4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/2.0.2" + }, + "time": "2021-11-05T16:47:00+00:00" + }, + { + "name": "psr/event-dispatcher", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "support": { + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + }, + "time": "2019-01-08T18:20:26+00:00" + }, + { + "name": "psr/http-client", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-client.git", + "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", + "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", + "keywords": [ + "http", + "http-client", + "psr", + "psr-18" + ], + "support": { + "source": "https://github.com/php-fig/http-client/tree/master" + }, + "time": "2020-06-29T06:28:15+00:00" + }, + { + "name": "psr/http-factory", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "shasum": "" + }, + "require": { + "php": ">=7.0.0", + "psr/http-message": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-factory/tree/master" + }, + "time": "2019-04-30T12:38:16+00:00" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/master" + }, + "time": "2016-08-06T14:39:51+00:00" + }, + { + "name": "psr/log", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/3.0.0" + }, + "time": "2021-07-14T16:46:02+00:00" + }, + { + "name": "psr/simple-cache", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/764e0b3939f5ca87cb904f570ef9be2d78a07865", + "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], + "support": { + "source": "https://github.com/php-fig/simple-cache/tree/3.0.0" + }, + "time": "2021-10-29T13:26:27+00:00" + }, + { + "name": "psy/psysh", + "version": "v0.11.14", + "source": { + "type": "git", + "url": "https://github.com/bobthecow/psysh.git", + "reference": "8c2e264def7a8263a68ef6f0b55ce90b77d41e17" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/8c2e264def7a8263a68ef6f0b55ce90b77d41e17", + "reference": "8c2e264def7a8263a68ef6f0b55ce90b77d41e17", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-tokenizer": "*", + "nikic/php-parser": "^4.0 || ^3.1", + "php": "^8.0 || ^7.0.8", + "symfony/console": "^6.0 || ^5.0 || ^4.0 || ^3.4", + "symfony/var-dumper": "^6.0 || ^5.0 || ^4.0 || ^3.4" + }, + "conflict": { + "symfony/console": "4.4.37 || 5.3.14 || 5.3.15 || 5.4.3 || 5.4.4 || 6.0.3 || 6.0.4" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.2" + }, + "suggest": { + "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", + "ext-pdo-sqlite": "The doc command requires SQLite to work.", + "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well.", + "ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history." + }, + "bin": [ + "bin/psysh" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "0.11.x-dev" + } + }, + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Psy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Justin Hileman", + "email": "justin@justinhileman.info", + "homepage": "http://justinhileman.com" + } + ], + "description": "An interactive shell for modern PHP.", + "homepage": "http://psysh.org", + "keywords": [ + "REPL", + "console", + "interactive", + "shell" + ], + "support": { + "issues": "https://github.com/bobthecow/psysh/issues", + "source": "https://github.com/bobthecow/psysh/tree/v0.11.14" + }, + "time": "2023-03-28T03:41:01+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "support": { + "issues": "https://github.com/ralouphie/getallheaders/issues", + "source": "https://github.com/ralouphie/getallheaders/tree/develop" + }, + "time": "2019-03-08T08:55:37+00:00" + }, + { + "name": "ramsey/collection", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/ramsey/collection.git", + "reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ramsey/collection/zipball/a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5", + "reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "require-dev": { + "captainhook/plugin-composer": "^5.3", + "ergebnis/composer-normalize": "^2.28.3", + "fakerphp/faker": "^1.21", + "hamcrest/hamcrest-php": "^2.0", + "jangregor/phpstan-prophecy": "^1.0", + "mockery/mockery": "^1.5", + "php-parallel-lint/php-console-highlighter": "^1.0", + "php-parallel-lint/php-parallel-lint": "^1.3", + "phpcsstandards/phpcsutils": "^1.0.0-rc1", + "phpspec/prophecy-phpunit": "^2.0", + "phpstan/extension-installer": "^1.2", + "phpstan/phpstan": "^1.9", + "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^9.5", + "psalm/plugin-mockery": "^1.1", + "psalm/plugin-phpunit": "^0.18.4", + "ramsey/coding-standard": "^2.0.3", + "ramsey/conventional-commits": "^1.3", + "vimeo/psalm": "^5.4" + }, + "type": "library", + "extra": { + "captainhook": { + "force-install": true + }, + "ramsey/conventional-commits": { + "configFile": "conventional-commits.json" + } + }, + "autoload": { + "psr-4": { + "Ramsey\\Collection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ben Ramsey", + "email": "ben@benramsey.com", + "homepage": "https://benramsey.com" + } + ], + "description": "A PHP library for representing and manipulating collections.", + "keywords": [ + "array", + "collection", + "hash", + "map", + "queue", + "set" + ], + "support": { + "issues": "https://github.com/ramsey/collection/issues", + "source": "https://github.com/ramsey/collection/tree/2.0.0" + }, + "funding": [ + { + "url": "https://github.com/ramsey", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/ramsey/collection", + "type": "tidelift" + } + ], + "time": "2022-12-31T21:50:55+00:00" + }, + { + "name": "ramsey/uuid", + "version": "4.7.3", + "source": { + "type": "git", + "url": "https://github.com/ramsey/uuid.git", + "reference": "433b2014e3979047db08a17a205f410ba3869cf2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/433b2014e3979047db08a17a205f410ba3869cf2", + "reference": "433b2014e3979047db08a17a205f410ba3869cf2", + "shasum": "" + }, + "require": { + "brick/math": "^0.8.8 || ^0.9 || ^0.10", + "ext-json": "*", + "php": "^8.0", + "ramsey/collection": "^1.2 || ^2.0" + }, + "replace": { + "rhumsaa/uuid": "self.version" + }, + "require-dev": { + "captainhook/captainhook": "^5.10", + "captainhook/plugin-composer": "^5.3", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", + "doctrine/annotations": "^1.8", + "ergebnis/composer-normalize": "^2.15", + "mockery/mockery": "^1.3", + "paragonie/random-lib": "^2", + "php-mock/php-mock": "^2.2", + "php-mock/php-mock-mockery": "^1.3", + "php-parallel-lint/php-parallel-lint": "^1.1", + "phpbench/phpbench": "^1.0", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-phpunit": "^1.1", + "phpunit/phpunit": "^8.5 || ^9", + "ramsey/composer-repl": "^1.4", + "slevomat/coding-standard": "^8.4", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "^4.9" + }, + "suggest": { + "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.", + "ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.", + "ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.", + "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter", + "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." + }, + "type": "library", + "extra": { + "captainhook": { + "force-install": true + } + }, + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Ramsey\\Uuid\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A PHP library for generating and working with universally unique identifiers (UUIDs).", + "keywords": [ + "guid", + "identifier", + "uuid" + ], + "support": { + "issues": "https://github.com/ramsey/uuid/issues", + "source": "https://github.com/ramsey/uuid/tree/4.7.3" + }, + "funding": [ + { + "url": "https://github.com/ramsey", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/ramsey/uuid", + "type": "tidelift" + } + ], + "time": "2023-01-12T18:13:24+00:00" + }, + { + "name": "symfony/console", + "version": "v6.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "cbad09eb8925b6ad4fb721c7a179344dc4a19d45" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/cbad09eb8925b6ad4fb721c7a179344dc4a19d45", + "reference": "cbad09eb8925b6ad4fb721c7a179344dc4a19d45", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/string": "^5.4|^6.0" + }, + "conflict": { + "symfony/dependency-injection": "<5.4", + "symfony/dotenv": "<5.4", + "symfony/event-dispatcher": "<5.4", + "symfony/lock": "<5.4", + "symfony/process": "<5.4" + }, + "provide": { + "psr/log-implementation": "1.0|2.0|3.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/lock": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/var-dumper": "^5.4|^6.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v6.2.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-02-25T17:00:03+00:00" + }, + { + "name": "symfony/css-selector", + "version": "v6.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/css-selector.git", + "reference": "aedf3cb0f5b929ec255d96bbb4909e9932c769e0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/aedf3cb0f5b929ec255d96bbb4909e9932c769e0", + "reference": "aedf3cb0f5b929ec255d96bbb4909e9932c769e0", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\CssSelector\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Jean-François Simon", + "email": "jeanfrancois.simon@sensiolabs.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Converts CSS selectors to XPath expressions", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/css-selector/tree/v6.2.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-02-14T08:44:56+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.2.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e", + "reference": "e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.3-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-03-01T10:25:55+00:00" + }, + { + "name": "symfony/error-handler", + "version": "v6.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/error-handler.git", + "reference": "61e90f94eb014054000bc902257d2763fac09166" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/61e90f94eb014054000bc902257d2763fac09166", + "reference": "61e90f94eb014054000bc902257d2763fac09166", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/log": "^1|^2|^3", + "symfony/var-dumper": "^5.4|^6.0" + }, + "require-dev": { + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/http-kernel": "^5.4|^6.0", + "symfony/serializer": "^5.4|^6.0" + }, + "bin": [ + "Resources/bin/patch-type-declarations" + ], + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\ErrorHandler\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools to manage errors and ease debugging PHP code", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/error-handler/tree/v6.2.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-02-14T08:44:56+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v6.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "404b307de426c1c488e5afad64403e5f145e82a5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/404b307de426c1c488e5afad64403e5f145e82a5", + "reference": "404b307de426c1c488e5afad64403e5f145e82a5", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/event-dispatcher-contracts": "^2|^3" + }, + "conflict": { + "symfony/dependency-injection": "<5.4" + }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "2.0|3.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/error-handler": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/http-foundation": "^5.4|^6.0", + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/stopwatch": "^5.4|^6.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/event-dispatcher/tree/v6.2.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-02-14T08:44:56+00:00" + }, + { + "name": "symfony/event-dispatcher-contracts", + "version": "v3.2.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "0ad3b6f1e4e2da5690fefe075cd53a238646d8dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/0ad3b6f1e4e2da5690fefe075cd53a238646d8dd", + "reference": "0ad3b6f1e4e2da5690fefe075cd53a238646d8dd", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/event-dispatcher": "^1" + }, + "suggest": { + "symfony/event-dispatcher-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.3-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\EventDispatcher\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to dispatching event", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.2.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-03-01T10:32:47+00:00" + }, + { + "name": "symfony/finder", + "version": "v6.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "20808dc6631aecafbe67c186af5dcb370be3a0eb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/20808dc6631aecafbe67c186af5dcb370be3a0eb", + "reference": "20808dc6631aecafbe67c186af5dcb370be3a0eb", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "symfony/filesystem": "^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Finds files and directories via an intuitive fluent interface", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/finder/tree/v6.2.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-02-16T09:57:23+00:00" + }, + { + "name": "symfony/http-foundation", + "version": "v6.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-foundation.git", + "reference": "5fc3038d4a594223f9ea42e4e985548f3fcc9a3b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/5fc3038d4a594223f9ea42e4e985548f3fcc9a3b", + "reference": "5fc3038d4a594223f9ea42e4e985548f3fcc9a3b", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-mbstring": "~1.1" + }, + "conflict": { + "symfony/cache": "<6.2" + }, + "require-dev": { + "predis/predis": "~1.0", + "symfony/cache": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/http-kernel": "^5.4.12|^6.0.12|^6.1.4", + "symfony/mime": "^5.4|^6.0", + "symfony/rate-limiter": "^5.2|^6.0" + }, + "suggest": { + "symfony/mime": "To use the file extension guesser" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpFoundation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Defines an object-oriented layer for the HTTP specification", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/http-foundation/tree/v6.2.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-02-21T10:54:55+00:00" + }, + { + "name": "symfony/http-kernel", + "version": "v6.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-kernel.git", + "reference": "ca0680ad1e2d678536cc20e0ae33f9e4e5d2becd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/ca0680ad1e2d678536cc20e0ae33f9e4e5d2becd", + "reference": "ca0680ad1e2d678536cc20e0ae33f9e4e5d2becd", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/log": "^1|^2|^3", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/error-handler": "^6.1", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/http-foundation": "^5.4.21|^6.2.7", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "symfony/browser-kit": "<5.4", + "symfony/cache": "<5.4", + "symfony/config": "<6.1", + "symfony/console": "<5.4", + "symfony/dependency-injection": "<6.2", + "symfony/doctrine-bridge": "<5.4", + "symfony/form": "<5.4", + "symfony/http-client": "<5.4", + "symfony/mailer": "<5.4", + "symfony/messenger": "<5.4", + "symfony/translation": "<5.4", + "symfony/twig-bridge": "<5.4", + "symfony/validator": "<5.4", + "twig/twig": "<2.13" + }, + "provide": { + "psr/log-implementation": "1.0|2.0|3.0" + }, + "require-dev": { + "psr/cache": "^1.0|^2.0|^3.0", + "symfony/browser-kit": "^5.4|^6.0", + "symfony/config": "^6.1", + "symfony/console": "^5.4|^6.0", + "symfony/css-selector": "^5.4|^6.0", + "symfony/dependency-injection": "^6.2", + "symfony/dom-crawler": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/finder": "^5.4|^6.0", + "symfony/http-client-contracts": "^1.1|^2|^3", + "symfony/process": "^5.4|^6.0", + "symfony/routing": "^5.4|^6.0", + "symfony/stopwatch": "^5.4|^6.0", + "symfony/translation": "^5.4|^6.0", + "symfony/translation-contracts": "^1.1|^2|^3", + "symfony/uid": "^5.4|^6.0", + "twig/twig": "^2.13|^3.0.4" + }, + "suggest": { + "symfony/browser-kit": "", + "symfony/config": "", + "symfony/console": "", + "symfony/dependency-injection": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpKernel\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides a structured process for converting a Request into a Response", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/http-kernel/tree/v6.2.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-02-28T13:26:41+00:00" + }, + { + "name": "symfony/mailer", + "version": "v6.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/mailer.git", + "reference": "e4f84c633b72ec70efc50b8016871c3bc43e691e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/mailer/zipball/e4f84c633b72ec70efc50b8016871c3bc43e691e", + "reference": "e4f84c633b72ec70efc50b8016871c3bc43e691e", + "shasum": "" + }, + "require": { + "egulias/email-validator": "^2.1.10|^3|^4", + "php": ">=8.1", + "psr/event-dispatcher": "^1", + "psr/log": "^1|^2|^3", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/mime": "^6.2", + "symfony/service-contracts": "^1.1|^2|^3" + }, + "conflict": { + "symfony/http-kernel": "<5.4", + "symfony/messenger": "<6.2", + "symfony/mime": "<6.2", + "symfony/twig-bridge": "<6.2.1" + }, + "require-dev": { + "symfony/console": "^5.4|^6.0", + "symfony/http-client": "^5.4|^6.0", + "symfony/messenger": "^6.2", + "symfony/twig-bridge": "^6.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Mailer\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Helps sending emails", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/mailer/tree/v6.2.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-02-21T10:35:38+00:00" + }, + { + "name": "symfony/mime", + "version": "v6.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/mime.git", + "reference": "62e341f80699badb0ad70b31149c8df89a2d778e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/mime/zipball/62e341f80699badb0ad70b31149c8df89a2d778e", + "reference": "62e341f80699badb0ad70b31149c8df89a2d778e", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-intl-idn": "^1.10", + "symfony/polyfill-mbstring": "^1.0" + }, + "conflict": { + "egulias/email-validator": "~3.0.0", + "phpdocumentor/reflection-docblock": "<3.2.2", + "phpdocumentor/type-resolver": "<1.4.0", + "symfony/mailer": "<5.4", + "symfony/serializer": "<6.2" + }, + "require-dev": { + "egulias/email-validator": "^2.1.10|^3.1|^4", + "league/html-to-markdown": "^5.0", + "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/property-access": "^5.4|^6.0", + "symfony/property-info": "^5.4|^6.0", + "symfony/serializer": "^6.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Mime\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Allows manipulating MIME messages", + "homepage": "https://symfony.com", + "keywords": [ + "mime", + "mime-type" + ], + "support": { + "source": "https://github.com/symfony/mime/tree/v6.2.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-02-24T10:42:00+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "511a08c03c1960e08a883f4cffcacd219b758354" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354", + "reference": "511a08c03c1960e08a883f4cffcacd219b758354", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-intl-idn", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-idn.git", + "reference": "639084e360537a19f9ee352433b84ce831f3d2da" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/639084e360537a19f9ee352433b84ce831f3d2da", + "reference": "639084e360537a19f9ee352433b84ce831f3d2da", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "symfony/polyfill-intl-normalizer": "^1.10", + "symfony/polyfill-php72": "^1.10" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Idn\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Laurent Bassin", + "email": "laurent@bassin.info" + }, + { + "name": "Trevor Rowbotham", + "email": "trevor.rowbotham@pm.me" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "idn", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-php72", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "869329b1e9894268a8a61dabb69153029b7a8c97" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/869329b1e9894268a8a61dabb69153029b7a8c97", + "reference": "869329b1e9894268a8a61dabb69153029b7a8c97", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php72/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-uuid", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-uuid.git", + "reference": "f3cf1a645c2734236ed1e2e671e273eeb3586166" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-uuid/zipball/f3cf1a645c2734236ed1e2e671e273eeb3586166", + "reference": "f3cf1a645c2734236ed1e2e671e273eeb3586166", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-uuid": "*" + }, + "suggest": { + "ext-uuid": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Uuid\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Grégoire Pineau", + "email": "lyrixx@lyrixx.info" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for uuid functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "uuid" + ], + "support": { + "source": "https://github.com/symfony/polyfill-uuid/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/process", + "version": "v6.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "680e8a2ea6b3f87aecc07a6a65a203ae573d1902" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/680e8a2ea6b3f87aecc07a6a65a203ae573d1902", + "reference": "680e8a2ea6b3f87aecc07a6a65a203ae573d1902", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Executes commands in sub-processes", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/process/tree/v6.2.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-02-24T10:42:00+00:00" + }, + { + "name": "symfony/routing", + "version": "v6.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/routing.git", + "reference": "fa643fa4c56de161f8bc8c0492a76a60140b50e4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/routing/zipball/fa643fa4c56de161f8bc8c0492a76a60140b50e4", + "reference": "fa643fa4c56de161f8bc8c0492a76a60140b50e4", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "conflict": { + "doctrine/annotations": "<1.12", + "symfony/config": "<6.2", + "symfony/dependency-injection": "<5.4", + "symfony/yaml": "<5.4" + }, + "require-dev": { + "doctrine/annotations": "^1.12|^2", + "psr/log": "^1|^2|^3", + "symfony/config": "^6.2", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/http-foundation": "^5.4|^6.0", + "symfony/yaml": "^5.4|^6.0" + }, + "suggest": { + "symfony/config": "For using the all-in-one router or any loader", + "symfony/expression-language": "For using expression matching", + "symfony/http-foundation": "For using a Symfony Request object", + "symfony/yaml": "For using the YAML loader" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Routing\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Maps an HTTP request to a set of configuration variables", + "homepage": "https://symfony.com", + "keywords": [ + "router", + "routing", + "uri", + "url" + ], + "support": { + "source": "https://github.com/symfony/routing/tree/v6.2.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-02-14T08:53:37+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v3.2.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "a8c9cedf55f314f3a186041d19537303766df09a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/a8c9cedf55f314f3a186041d19537303766df09a", + "reference": "a8c9cedf55f314f3a186041d19537303766df09a", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/container": "^2.0" + }, + "conflict": { + "ext-psr": "<1.1|>=2" + }, + "suggest": { + "symfony/service-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.3-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v3.2.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-03-01T10:32:47+00:00" + }, + { + "name": "symfony/string", + "version": "v6.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "67b8c1eec78296b85dc1c7d9743830160218993d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/67b8c1eec78296b85dc1c7d9743830160218993d", + "reference": "67b8c1eec78296b85dc1c7d9743830160218993d", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/translation-contracts": "<2.0" + }, + "require-dev": { + "symfony/error-handler": "^5.4|^6.0", + "symfony/http-client": "^5.4|^6.0", + "symfony/intl": "^6.2", + "symfony/translation-contracts": "^2.0|^3.0", + "symfony/var-exporter": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v6.2.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-02-24T10:42:00+00:00" + }, + { + "name": "symfony/translation", + "version": "v6.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation.git", + "reference": "90db1c6138c90527917671cd9ffa9e8b359e3a73" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation/zipball/90db1c6138c90527917671cd9ffa9e8b359e3a73", + "reference": "90db1c6138c90527917671cd9ffa9e8b359e3a73", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-mbstring": "~1.0", + "symfony/translation-contracts": "^2.3|^3.0" + }, + "conflict": { + "symfony/config": "<5.4", + "symfony/console": "<5.4", + "symfony/dependency-injection": "<5.4", + "symfony/http-kernel": "<5.4", + "symfony/twig-bundle": "<5.4", + "symfony/yaml": "<5.4" + }, + "provide": { + "symfony/translation-implementation": "2.3|3.0" + }, + "require-dev": { + "nikic/php-parser": "^4.13", + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/console": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/finder": "^5.4|^6.0", + "symfony/http-client-contracts": "^1.1|^2.0|^3.0", + "symfony/http-kernel": "^5.4|^6.0", + "symfony/intl": "^5.4|^6.0", + "symfony/polyfill-intl-icu": "^1.21", + "symfony/routing": "^5.4|^6.0", + "symfony/service-contracts": "^1.1.2|^2|^3", + "symfony/yaml": "^5.4|^6.0" + }, + "suggest": { + "nikic/php-parser": "To use PhpAstExtractor", + "psr/log-implementation": "To use logging capability in translator", + "symfony/config": "", + "symfony/yaml": "" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\Translation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools to internationalize your application", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/translation/tree/v6.2.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-02-24T10:42:00+00:00" + }, + { + "name": "symfony/translation-contracts", + "version": "v3.2.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation-contracts.git", + "reference": "dfec258b9dd17a6b24420d464c43bffe347441c8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/dfec258b9dd17a6b24420d464c43bffe347441c8", + "reference": "dfec258b9dd17a6b24420d464c43bffe347441c8", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "suggest": { + "symfony/translation-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.3-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Translation\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to translation", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/translation-contracts/tree/v3.2.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-03-01T10:32:47+00:00" + }, + { + "name": "symfony/uid", + "version": "v6.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/uid.git", + "reference": "d30c72a63897cfa043e1de4d4dd2ffa9ecefcdc0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/uid/zipball/d30c72a63897cfa043e1de4d4dd2ffa9ecefcdc0", + "reference": "d30c72a63897cfa043e1de4d4dd2ffa9ecefcdc0", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-uuid": "^1.15" + }, + "require-dev": { + "symfony/console": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Uid\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Grégoire Pineau", + "email": "lyrixx@lyrixx.info" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to generate and represent UIDs", + "homepage": "https://symfony.com", + "keywords": [ + "UID", + "ulid", + "uuid" + ], + "support": { + "source": "https://github.com/symfony/uid/tree/v6.2.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-02-14T08:44:56+00:00" + }, + { + "name": "symfony/var-dumper", + "version": "v6.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-dumper.git", + "reference": "cf8d4ca1ddc1e3cc242375deb8fc23e54f5e2a1e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/cf8d4ca1ddc1e3cc242375deb8fc23e54f5e2a1e", + "reference": "cf8d4ca1ddc1e3cc242375deb8fc23e54f5e2a1e", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "phpunit/phpunit": "<5.4.3", + "symfony/console": "<5.4" + }, + "require-dev": { + "ext-iconv": "*", + "symfony/console": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/uid": "^5.4|^6.0", + "twig/twig": "^2.13|^3.0.4" + }, + "suggest": { + "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", + "ext-intl": "To show region name in time zone dump", + "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script" + }, + "bin": [ + "Resources/bin/var-dump-server" + ], + "type": "library", + "autoload": { + "files": [ + "Resources/functions/dump.php" + ], + "psr-4": { + "Symfony\\Component\\VarDumper\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides mechanisms for walking through any arbitrary PHP variable", + "homepage": "https://symfony.com", + "keywords": [ + "debug", + "dump" + ], + "support": { + "source": "https://github.com/symfony/var-dumper/tree/v6.2.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-02-24T10:42:00+00:00" + }, + { + "name": "tijsverkoyen/css-to-inline-styles", + "version": "2.2.6", + "source": { + "type": "git", + "url": "https://github.com/tijsverkoyen/CssToInlineStyles.git", + "reference": "c42125b83a4fa63b187fdf29f9c93cb7733da30c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/c42125b83a4fa63b187fdf29f9c93cb7733da30c", + "reference": "c42125b83a4fa63b187fdf29f9c93cb7733da30c", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "php": "^5.5 || ^7.0 || ^8.0", + "symfony/css-selector": "^2.7 || ^3.0 || ^4.0 || ^5.0 || ^6.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^7.5 || ^8.5.21 || ^9.5.10" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "TijsVerkoyen\\CssToInlineStyles\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Tijs Verkoyen", + "email": "css_to_inline_styles@verkoyen.eu", + "role": "Developer" + } + ], + "description": "CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.", + "homepage": "https://github.com/tijsverkoyen/CssToInlineStyles", + "support": { + "issues": "https://github.com/tijsverkoyen/CssToInlineStyles/issues", + "source": "https://github.com/tijsverkoyen/CssToInlineStyles/tree/2.2.6" + }, + "time": "2023-01-03T09:29:04+00:00" + }, + { + "name": "vlucas/phpdotenv", + "version": "v5.5.0", + "source": { + "type": "git", + "url": "https://github.com/vlucas/phpdotenv.git", + "reference": "1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7", + "reference": "1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7", + "shasum": "" + }, + "require": { + "ext-pcre": "*", + "graham-campbell/result-type": "^1.0.2", + "php": "^7.1.3 || ^8.0", + "phpoption/phpoption": "^1.8", + "symfony/polyfill-ctype": "^1.23", + "symfony/polyfill-mbstring": "^1.23.1", + "symfony/polyfill-php80": "^1.23.1" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.4.1", + "ext-filter": "*", + "phpunit/phpunit": "^7.5.20 || ^8.5.30 || ^9.5.25" + }, + "suggest": { + "ext-filter": "Required to use the boolean validator." + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": true + }, + "branch-alias": { + "dev-master": "5.5-dev" + } + }, + "autoload": { + "psr-4": { + "Dotenv\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Vance Lucas", + "email": "vance@vancelucas.com", + "homepage": "https://github.com/vlucas" + } + ], + "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", + "keywords": [ + "dotenv", + "env", + "environment" + ], + "support": { + "issues": "https://github.com/vlucas/phpdotenv/issues", + "source": "https://github.com/vlucas/phpdotenv/tree/v5.5.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv", + "type": "tidelift" + } + ], + "time": "2022-10-16T01:01:54+00:00" + }, + { + "name": "voku/portable-ascii", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/voku/portable-ascii.git", + "reference": "b56450eed252f6801410d810c8e1727224ae0743" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/voku/portable-ascii/zipball/b56450eed252f6801410d810c8e1727224ae0743", + "reference": "b56450eed252f6801410d810c8e1727224ae0743", + "shasum": "" + }, + "require": { + "php": ">=7.0.0" + }, + "require-dev": { + "phpunit/phpunit": "~6.0 || ~7.0 || ~9.0" + }, + "suggest": { + "ext-intl": "Use Intl for transliterator_transliterate() support" + }, + "type": "library", + "autoload": { + "psr-4": { + "voku\\": "src/voku/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Lars Moelleken", + "homepage": "http://www.moelleken.org/" + } + ], + "description": "Portable ASCII library - performance optimized (ascii) string functions for php.", + "homepage": "https://github.com/voku/portable-ascii", + "keywords": [ + "ascii", + "clean", + "php" + ], + "support": { + "issues": "https://github.com/voku/portable-ascii/issues", + "source": "https://github.com/voku/portable-ascii/tree/2.0.1" + }, + "funding": [ + { + "url": "https://www.paypal.me/moelleken", + "type": "custom" + }, + { + "url": "https://github.com/voku", + "type": "github" + }, + { + "url": "https://opencollective.com/portable-ascii", + "type": "open_collective" + }, + { + "url": "https://www.patreon.com/voku", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/voku/portable-ascii", + "type": "tidelift" + } + ], + "time": "2022-03-08T17:03:00+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.11.0", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/assert.git", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "php": "^7.2 || ^8.0" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.13" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.11.0" + }, + "time": "2022-06-03T18:03:27+00:00" + } + ], + "packages-dev": [ + { + "name": "fakerphp/faker", + "version": "v1.21.0", + "source": { + "type": "git", + "url": "https://github.com/FakerPHP/Faker.git", + "reference": "92efad6a967f0b79c499705c69b662f738cc9e4d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/92efad6a967f0b79c499705c69b662f738cc9e4d", + "reference": "92efad6a967f0b79c499705c69b662f738cc9e4d", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0", + "psr/container": "^1.0 || ^2.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" + }, + "conflict": { + "fzaninotto/faker": "*" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.4.1", + "doctrine/persistence": "^1.3 || ^2.0", + "ext-intl": "*", + "phpunit/phpunit": "^9.5.26", + "symfony/phpunit-bridge": "^5.4.16" + }, + "suggest": { + "doctrine/orm": "Required to use Faker\\ORM\\Doctrine", + "ext-curl": "Required by Faker\\Provider\\Image to download images.", + "ext-dom": "Required by Faker\\Provider\\HtmlLorem for generating random HTML.", + "ext-iconv": "Required by Faker\\Provider\\ru_RU\\Text::realText() for generating real Russian text.", + "ext-mbstring": "Required for multibyte Unicode string functionality." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "v1.21-dev" + } + }, + "autoload": { + "psr-4": { + "Faker\\": "src/Faker/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "François Zaninotto" + } + ], + "description": "Faker is a PHP library that generates fake data for you.", + "keywords": [ + "data", + "faker", + "fixtures" + ], + "support": { + "issues": "https://github.com/FakerPHP/Faker/issues", + "source": "https://github.com/FakerPHP/Faker/tree/v1.21.0" + }, + "time": "2022-12-13T13:54:32+00:00" + }, + { + "name": "filp/whoops", + "version": "2.15.1", + "source": { + "type": "git", + "url": "https://github.com/filp/whoops.git", + "reference": "e864ac957acd66e1565f25efda61e37791a5db0b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/filp/whoops/zipball/e864ac957acd66e1565f25efda61e37791a5db0b", + "reference": "e864ac957acd66e1565f25efda61e37791a5db0b", + "shasum": "" + }, + "require": { + "php": "^5.5.9 || ^7.0 || ^8.0", + "psr/log": "^1.0.1 || ^2.0 || ^3.0" + }, + "require-dev": { + "mockery/mockery": "^0.9 || ^1.0", + "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.3", + "symfony/var-dumper": "^2.6 || ^3.0 || ^4.0 || ^5.0" + }, + "suggest": { + "symfony/var-dumper": "Pretty print complex values better with var-dumper available", + "whoops/soap": "Formats errors as SOAP responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "autoload": { + "psr-4": { + "Whoops\\": "src/Whoops/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Filipe Dobreira", + "homepage": "https://github.com/filp", + "role": "Developer" + } + ], + "description": "php error handling for cool kids", + "homepage": "https://filp.github.io/whoops/", + "keywords": [ + "error", + "exception", + "handling", + "library", + "throwable", + "whoops" + ], + "support": { + "issues": "https://github.com/filp/whoops/issues", + "source": "https://github.com/filp/whoops/tree/2.15.1" + }, + "funding": [ + { + "url": "https://github.com/denis-sokolov", + "type": "github" + } + ], + "time": "2023-03-06T18:09:13+00:00" + }, + { + "name": "hamcrest/hamcrest-php", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/hamcrest/hamcrest-php.git", + "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", + "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", + "shasum": "" + }, + "require": { + "php": "^5.3|^7.0|^8.0" + }, + "replace": { + "cordoval/hamcrest-php": "*", + "davedevelopment/hamcrest-php": "*", + "kodova/hamcrest-php": "*" + }, + "require-dev": { + "phpunit/php-file-iterator": "^1.4 || ^2.0", + "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "autoload": { + "classmap": [ + "hamcrest" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "This is the PHP port of Hamcrest Matchers", + "keywords": [ + "test" + ], + "support": { + "issues": "https://github.com/hamcrest/hamcrest-php/issues", + "source": "https://github.com/hamcrest/hamcrest-php/tree/v2.0.1" + }, + "time": "2020-07-09T08:09:16+00:00" + }, + { + "name": "laravel/pint", + "version": "v1.7.0", + "source": { + "type": "git", + "url": "https://github.com/laravel/pint.git", + "reference": "d55381c73b7308e1b8a124084e804193a179092e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/pint/zipball/d55381c73b7308e1b8a124084e804193a179092e", + "reference": "d55381c73b7308e1b8a124084e804193a179092e", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "ext-tokenizer": "*", + "ext-xml": "*", + "php": "^8.1.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.14.4", + "illuminate/view": "^10.0.0", + "laravel-zero/framework": "^10.0.0", + "mockery/mockery": "^1.5.1", + "nunomaduro/larastan": "^2.4.0", + "nunomaduro/termwind": "^1.15.1", + "pestphp/pest": "^1.22.4" + }, + "bin": [ + "builds/pint" + ], + "type": "project", + "autoload": { + "psr-4": { + "App\\": "app/", + "Database\\Seeders\\": "database/seeders/", + "Database\\Factories\\": "database/factories/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" + } + ], + "description": "An opinionated code formatter for PHP.", + "homepage": "https://laravel.com", + "keywords": [ + "format", + "formatter", + "lint", + "linter", + "php" + ], + "support": { + "issues": "https://github.com/laravel/pint/issues", + "source": "https://github.com/laravel/pint" + }, + "time": "2023-03-21T10:55:35+00:00" + }, + { + "name": "laravel/sail", + "version": "v1.21.3", + "source": { + "type": "git", + "url": "https://github.com/laravel/sail.git", + "reference": "3042ff8cf403817c340d5a7762b2d32900239f46" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/sail/zipball/3042ff8cf403817c340d5a7762b2d32900239f46", + "reference": "3042ff8cf403817c340d5a7762b2d32900239f46", + "shasum": "" + }, + "require": { + "illuminate/console": "^8.0|^9.0|^10.0", + "illuminate/contracts": "^8.0|^9.0|^10.0", + "illuminate/support": "^8.0|^9.0|^10.0", + "php": "^7.3|^8.0", + "symfony/yaml": "^6.0" + }, + "require-dev": { + "orchestra/testbench": "^6.0|^7.0|^8.0", + "phpstan/phpstan": "^1.10" + }, + "bin": [ + "bin/sail" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + }, + "laravel": { + "providers": [ + "Laravel\\Sail\\SailServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Laravel\\Sail\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Docker files for running a basic Laravel application.", + "keywords": [ + "docker", + "laravel" + ], + "support": { + "issues": "https://github.com/laravel/sail/issues", + "source": "https://github.com/laravel/sail" + }, + "time": "2023-03-13T01:22:10+00:00" + }, + { + "name": "mockery/mockery", + "version": "1.5.1", + "source": { + "type": "git", + "url": "https://github.com/mockery/mockery.git", + "reference": "e92dcc83d5a51851baf5f5591d32cb2b16e3684e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mockery/mockery/zipball/e92dcc83d5a51851baf5f5591d32cb2b16e3684e", + "reference": "e92dcc83d5a51851baf5f5591d32cb2b16e3684e", + "shasum": "" + }, + "require": { + "hamcrest/hamcrest-php": "^2.0.1", + "lib-pcre": ">=7.0", + "php": "^7.3 || ^8.0" + }, + "conflict": { + "phpunit/phpunit": "<8.0" + }, + "require-dev": { + "phpunit/phpunit": "^8.5 || ^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "psr-0": { + "Mockery": "library/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Pádraic Brady", + "email": "padraic.brady@gmail.com", + "homepage": "http://blog.astrumfutura.com" + }, + { + "name": "Dave Marshall", + "email": "dave.marshall@atstsolutions.co.uk", + "homepage": "http://davedevelopment.co.uk" + } + ], + "description": "Mockery is a simple yet flexible PHP mock object framework", + "homepage": "https://github.com/mockery/mockery", + "keywords": [ + "BDD", + "TDD", + "library", + "mock", + "mock objects", + "mockery", + "stub", + "test", + "test double", + "testing" + ], + "support": { + "issues": "https://github.com/mockery/mockery/issues", + "source": "https://github.com/mockery/mockery/tree/1.5.1" + }, + "time": "2022-09-07T15:32:08+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.11.1", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" + }, + "require-dev": { + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" + }, + "type": "library", + "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2023-03-08T13:26:56+00:00" + }, + { + "name": "nunomaduro/collision", + "version": "v7.3.3", + "source": { + "type": "git", + "url": "https://github.com/nunomaduro/collision.git", + "reference": "c680af93e414110b36056029f63120e6bc78f6e3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/c680af93e414110b36056029f63120e6bc78f6e3", + "reference": "c680af93e414110b36056029f63120e6bc78f6e3", + "shasum": "" + }, + "require": { + "filp/whoops": "^2.15.1", + "nunomaduro/termwind": "^1.15.1", + "php": "^8.1.0", + "symfony/console": "^6.2.7" + }, + "conflict": { + "phpunit/phpunit": "<10.0.17" + }, + "require-dev": { + "brianium/paratest": "^7.1.2", + "laravel/framework": "^10.4.1", + "laravel/pint": "^1.7.0", + "laravel/sail": "^1.21.2", + "laravel/sanctum": "^3.2.1", + "laravel/tinker": "^2.8.1", + "nunomaduro/larastan": "^2.5.1", + "orchestra/testbench-core": "^8.1.1", + "pestphp/pest": "^2.0.2", + "phpunit/phpunit": "^10.0.17", + "sebastian/environment": "^6.0.0", + "spatie/laravel-ignition": "^2.0.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider" + ] + } + }, + "autoload": { + "files": [ + "./src/Adapters/Phpunit/Autoload.php" + ], + "psr-4": { + "NunoMaduro\\Collision\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" + } + ], + "description": "Cli error handling for console/command-line PHP applications.", + "keywords": [ + "artisan", + "cli", + "command-line", + "console", + "error", + "handling", + "laravel", + "laravel-zero", + "php", + "symfony" + ], + "support": { + "issues": "https://github.com/nunomaduro/collision/issues", + "source": "https://github.com/nunomaduro/collision" + }, + "funding": [ + { + "url": "https://www.paypal.com/paypalme/enunomaduro", + "type": "custom" + }, + { + "url": "https://github.com/nunomaduro", + "type": "github" + }, + { + "url": "https://www.patreon.com/nunomaduro", + "type": "patreon" + } + ], + "time": "2023-03-23T21:41:35+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.3" + }, + "time": "2021-07-20T11:28:43+00:00" + }, + { + "name": "phar-io/version", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" + }, + "time": "2022-02-21T01:04:05+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "10.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "20800e84296ea4732f9a125e08ce86b4004ae3e4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/20800e84296ea4732f9a125e08ce86b4004ae3e4", + "reference": "20800e84296ea4732f9a125e08ce86b4004ae3e4", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.15", + "php": ">=8.1", + "phpunit/php-file-iterator": "^4.0", + "phpunit/php-text-template": "^3.0", + "sebastian/code-unit-reverse-lookup": "^3.0", + "sebastian/complexity": "^3.0", + "sebastian/environment": "^6.0", + "sebastian/lines-of-code": "^2.0", + "sebastian/version": "^4.0", + "theseer/tokenizer": "^1.2.0" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "suggest": { + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "10.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-03-06T13:00:19+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "fd9329ab3368f59fe1fe808a189c51086bd4b6bd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/fd9329ab3368f59fe1fe808a189c51086bd4b6bd", + "reference": "fd9329ab3368f59fe1fe808a189c51086bd4b6bd", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-10T16:53:14+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "4.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^10.0" + }, + "suggest": { + "ext-pcntl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/4.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:56:09+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "9f3d3709577a527025f55bcf0f7ab8052c8bb37d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/9f3d3709577a527025f55bcf0f7ab8052c8bb37d", + "reference": "9f3d3709577a527025f55bcf0f7ab8052c8bb37d", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/3.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:56:46+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "6.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/e2a2d67966e740530f4a3343fe2e030ffdc1161d", + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/6.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:57:52+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "10.0.19", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "20c23e85c86e5c06d63538ba464e8054f4744e62" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/20c23e85c86e5c06d63538ba464e8054f4744e62", + "reference": "20c23e85c86e5c06d63538ba464e8054f4744e62", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.3", + "phar-io/version": "^3.0.2", + "php": ">=8.1", + "phpunit/php-code-coverage": "^10.0", + "phpunit/php-file-iterator": "^4.0", + "phpunit/php-invoker": "^4.0", + "phpunit/php-text-template": "^3.0", + "phpunit/php-timer": "^6.0", + "sebastian/cli-parser": "^2.0", + "sebastian/code-unit": "^2.0", + "sebastian/comparator": "^5.0", + "sebastian/diff": "^5.0", + "sebastian/environment": "^6.0", + "sebastian/exporter": "^5.0", + "sebastian/global-state": "^6.0", + "sebastian/object-enumerator": "^5.0", + "sebastian/recursion-context": "^5.0", + "sebastian/type": "^4.0", + "sebastian/version": "^4.0" + }, + "suggest": { + "ext-soap": "To be able to generate mocks based on WSDL files" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "10.0-dev" + } + }, + "autoload": { + "files": [ + "src/Framework/Assert/Functions.php" + ], + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.0.19" + }, + "funding": [ + { + "url": "https://phpunit.de/sponsors.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" + } + ], + "time": "2023-03-27T11:46:33+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "efdc130dbbbb8ef0b545a994fd811725c5282cae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/efdc130dbbbb8ef0b545a994fd811725c5282cae", + "reference": "efdc130dbbbb8ef0b545a994fd811725c5282cae", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:58:15+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/a81fee9eef0b7a76af11d121767abc44c104e503", + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/2.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:58:43+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/3.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:59:15+00:00" + }, + { + "name": "sebastian/comparator", + "version": "5.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "72f01e6586e0caf6af81297897bd112eb7e9627c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/72f01e6586e0caf6af81297897bd112eb7e9627c", + "reference": "72f01e6586e0caf6af81297897bd112eb7e9627c", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/diff": "^5.0", + "sebastian/exporter": "^5.0" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T07:07:16+00:00" + }, + { + "name": "sebastian/complexity", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "e67d240970c9dc7ea7b2123a6d520e334dd61dc6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/e67d240970c9dc7ea7b2123a6d520e334dd61dc6", + "reference": "e67d240970c9dc7ea7b2123a6d520e334dd61dc6", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.10", + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/3.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:59:47+00:00" + }, + { + "name": "sebastian/diff", + "version": "5.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "aae9a0a43bff37bd5d8d0311426c87bf36153f02" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/aae9a0a43bff37bd5d8d0311426c87bf36153f02", + "reference": "aae9a0a43bff37bd5d8d0311426c87bf36153f02", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/5.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-03-23T05:12:41+00:00" + }, + { + "name": "sebastian/environment", + "version": "6.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "b6f3694c6386c7959915a0037652e0c40f6f69cc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/b6f3694c6386c7959915a0037652e0c40f6f69cc", + "reference": "b6f3694c6386c7959915a0037652e0c40f6f69cc", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "https://github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/6.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T07:03:04+00:00" + }, + { + "name": "sebastian/exporter", + "version": "5.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "f3ec4bf931c0b31e5b413f5b4fc970a7d03338c0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/f3ec4bf931c0b31e5b413f5b4fc970a7d03338c0", + "reference": "f3ec4bf931c0b31e5b413f5b4fc970a7d03338c0", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/recursion-context": "^5.0" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "https://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/5.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T07:06:49+00:00" + }, + { + "name": "sebastian/global-state", + "version": "6.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "aab257c712de87b90194febd52e4d184551c2d44" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/aab257c712de87b90194febd52e4d184551c2d44", + "reference": "aab257c712de87b90194febd52e4d184551c2d44", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T07:07:38+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "17c4d940ecafb3d15d2cf916f4108f664e28b130" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/17c4d940ecafb3d15d2cf916f4108f664e28b130", + "reference": "17c4d940ecafb3d15d2cf916f4108f664e28b130", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.10", + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T07:08:02+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "5.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/202d0e344a580d7f7d04b3fafce6933e59dae906", + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/5.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T07:08:32+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/24ed13d98130f0e7122df55d06c5c4942a577957", + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/3.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T07:06:18+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "5.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "05909fb5bc7df4c52992396d0116aed689f93712" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/05909fb5bc7df4c52992396d0116aed689f93712", + "reference": "05909fb5bc7df4c52992396d0116aed689f93712", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "https://github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/5.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T07:05:40+00:00" + }, + { + "name": "sebastian/type", + "version": "4.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/462699a16464c3944eefc02ebdd77882bd3925bf", + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/4.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T07:10:45+00:00" + }, + { + "name": "sebastian/version", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c51fa83a5d8f43f1402e3f32a005e6262244ef17", + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/4.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-07T11:34:05+00:00" + }, + { + "name": "spatie/backtrace", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/spatie/backtrace.git", + "reference": "ec4dd16476b802dbdc6b4467f84032837e316b8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/backtrace/zipball/ec4dd16476b802dbdc6b4467f84032837e316b8c", + "reference": "ec4dd16476b802dbdc6b4467f84032837e316b8c", + "shasum": "" + }, + "require": { + "php": "^7.3|^8.0" + }, + "require-dev": { + "ext-json": "*", + "phpunit/phpunit": "^9.3", + "spatie/phpunit-snapshot-assertions": "^4.2", + "symfony/var-dumper": "^5.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spatie\\Backtrace\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van de Herten", + "email": "freek@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" + } + ], + "description": "A better backtrace", + "homepage": "https://github.com/spatie/backtrace", + "keywords": [ + "Backtrace", + "spatie" + ], + "support": { + "source": "https://github.com/spatie/backtrace/tree/1.4.0" + }, + "funding": [ + { + "url": "https://github.com/sponsors/spatie", + "type": "github" + }, + { + "url": "https://spatie.be/open-source/support-us", + "type": "other" + } + ], + "time": "2023-03-04T08:57:24+00:00" + }, + { + "name": "spatie/flare-client-php", + "version": "1.3.5", + "source": { + "type": "git", + "url": "https://github.com/spatie/flare-client-php.git", + "reference": "3e5dd5ac4928f3d2d036bd02de5eb83fd0ef1f42" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/flare-client-php/zipball/3e5dd5ac4928f3d2d036bd02de5eb83fd0ef1f42", + "reference": "3e5dd5ac4928f3d2d036bd02de5eb83fd0ef1f42", + "shasum": "" + }, + "require": { + "illuminate/pipeline": "^8.0|^9.0|^10.0", + "php": "^8.0", + "spatie/backtrace": "^1.2", + "symfony/http-foundation": "^5.0|^6.0", + "symfony/mime": "^5.2|^6.0", + "symfony/process": "^5.2|^6.0", + "symfony/var-dumper": "^5.2|^6.0" + }, + "require-dev": { + "dms/phpunit-arraysubset-asserts": "^0.3.0", + "pestphp/pest": "^1.20", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "spatie/phpunit-snapshot-assertions": "^4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.1.x-dev" + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Spatie\\FlareClient\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Send PHP errors to Flare", + "homepage": "https://github.com/spatie/flare-client-php", + "keywords": [ + "exception", + "flare", + "reporting", + "spatie" + ], + "support": { + "issues": "https://github.com/spatie/flare-client-php/issues", + "source": "https://github.com/spatie/flare-client-php/tree/1.3.5" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2023-01-23T15:58:46+00:00" + }, + { + "name": "spatie/ignition", + "version": "1.4.5", + "source": { + "type": "git", + "url": "https://github.com/spatie/ignition.git", + "reference": "cc09114b7057bd217b676f047544b33f5b6247e6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/ignition/zipball/cc09114b7057bd217b676f047544b33f5b6247e6", + "reference": "cc09114b7057bd217b676f047544b33f5b6247e6", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "php": "^8.0", + "spatie/flare-client-php": "^1.1", + "symfony/console": "^5.4|^6.0", + "symfony/var-dumper": "^5.4|^6.0" + }, + "require-dev": { + "mockery/mockery": "^1.4", + "pestphp/pest": "^1.20", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "symfony/process": "^5.4|^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.4.x-dev" + } + }, + "autoload": { + "psr-4": { + "Spatie\\Ignition\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Spatie", + "email": "info@spatie.be", + "role": "Developer" + } + ], + "description": "A beautiful error page for PHP applications.", + "homepage": "https://flareapp.io/ignition", + "keywords": [ + "error", + "flare", + "laravel", + "page" + ], + "support": { + "docs": "https://flareapp.io/docs/ignition-for-laravel/introduction", + "forum": "https://twitter.com/flareappio", + "issues": "https://github.com/spatie/ignition/issues", + "source": "https://github.com/spatie/ignition" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2023-02-28T16:49:47+00:00" + }, + { + "name": "spatie/laravel-ignition", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/spatie/laravel-ignition.git", + "reference": "70c0e2a22c5c4b691a34db8c98bd6d695660a97a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/70c0e2a22c5c4b691a34db8c98bd6d695660a97a", + "reference": "70c0e2a22c5c4b691a34db8c98bd6d695660a97a", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "ext-json": "*", + "ext-mbstring": "*", + "illuminate/support": "^10.0", + "php": "^8.1", + "spatie/flare-client-php": "^1.3.5", + "spatie/ignition": "^1.4.3", + "symfony/console": "^6.2.3", + "symfony/var-dumper": "^6.2.3" + }, + "require-dev": { + "livewire/livewire": "^2.11", + "mockery/mockery": "^1.5.1", + "orchestra/testbench": "^8.0", + "pestphp/pest": "^1.22.3", + "phpstan/extension-installer": "^1.2", + "phpstan/phpstan-deprecation-rules": "^1.1.1", + "phpstan/phpstan-phpunit": "^1.3.3" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Spatie\\LaravelIgnition\\IgnitionServiceProvider" + ], + "aliases": { + "Flare": "Spatie\\LaravelIgnition\\Facades\\Flare" + } + }, + "branch-alias": { + "dev-main": "2.0-dev" + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Spatie\\LaravelIgnition\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Spatie", + "email": "info@spatie.be", + "role": "Developer" + } + ], + "description": "A beautiful error page for Laravel applications.", + "homepage": "https://flareapp.io/ignition", + "keywords": [ + "error", + "flare", + "laravel", + "page" + ], + "support": { + "docs": "https://flareapp.io/docs/ignition-for-laravel/introduction", + "forum": "https://twitter.com/flareappio", + "issues": "https://github.com/spatie/laravel-ignition/issues", + "source": "https://github.com/spatie/laravel-ignition" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2023-01-24T07:20:39+00:00" + }, + { + "name": "symfony/yaml", + "version": "v6.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "e8e6a1d59e050525f27a1f530aa9703423cb7f57" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/e8e6a1d59e050525f27a1f530aa9703423cb7f57", + "reference": "e8e6a1d59e050525f27a1f530aa9703423cb7f57", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "symfony/console": "<5.4" + }, + "require-dev": { + "symfony/console": "^5.4|^6.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, + "bin": [ + "Resources/bin/yaml-lint" + ], + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Loads and dumps YAML files", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/yaml/tree/v6.2.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-02-16T09:57:23+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2021-07-28T10:34:58+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": true, + "prefer-lowest": false, + "platform": { + "php": "^8.1" + }, + "platform-dev": [], + "plugin-api-version": "2.3.0" +} diff --git a/backup/config/app.php b/backup/config/app.php new file mode 100644 index 0000000..ef76a7e --- /dev/null +++ b/backup/config/app.php @@ -0,0 +1,215 @@ + env('APP_NAME', 'Laravel'), + + /* + |-------------------------------------------------------------------------- + | Application Environment + |-------------------------------------------------------------------------- + | + | This value determines the "environment" your application is currently + | running in. This may determine how you prefer to configure various + | services the application utilizes. Set this in your ".env" file. + | + */ + + 'env' => env('APP_ENV', 'production'), + + /* + |-------------------------------------------------------------------------- + | Application Debug Mode + |-------------------------------------------------------------------------- + | + | When your application is in debug mode, detailed error messages with + | stack traces will be shown on every error that occurs within your + | application. If disabled, a simple generic error page is shown. + | + */ + + 'debug' => (bool) env('APP_DEBUG', false), + + /* + |-------------------------------------------------------------------------- + | Application URL + |-------------------------------------------------------------------------- + | + | This URL is used by the console to properly generate URLs when using + | the Artisan command line tool. You should set this to the root of + | your application so that it is used when running Artisan tasks. + | + */ + + 'url' => env('APP_URL', 'http://localhost'), + + 'asset_url' => env('ASSET_URL'), + + /* + |-------------------------------------------------------------------------- + | Application Timezone + |-------------------------------------------------------------------------- + | + | Here you may specify the default timezone for your application, which + | will be used by the PHP date and date-time functions. We have gone + | ahead and set this to a sensible default for you out of the box. + | + */ + + 'timezone' => 'UTC', + + /* + |-------------------------------------------------------------------------- + | Application Locale Configuration + |-------------------------------------------------------------------------- + | + | The application locale determines the default locale that will be used + | by the translation service provider. You are free to set this value + | to any of the locales which will be supported by the application. + | + */ + + 'locale' => 'en', + + /* + |-------------------------------------------------------------------------- + | Application Fallback Locale + |-------------------------------------------------------------------------- + | + | The fallback locale determines the locale to use when the current one + | is not available. You may change the value to correspond to any of + | the language folders that are provided through your application. + | + */ + + 'fallback_locale' => 'en', + + /* + |-------------------------------------------------------------------------- + | Faker Locale + |-------------------------------------------------------------------------- + | + | This locale will be used by the Faker PHP library when generating fake + | data for your database seeds. For example, this will be used to get + | localized telephone numbers, street address information and more. + | + */ + + 'faker_locale' => 'en_US', + + /* + |-------------------------------------------------------------------------- + | Encryption Key + |-------------------------------------------------------------------------- + | + | This key is used by the Illuminate encrypter service and should be set + | to a random, 32 character string, otherwise these encrypted strings + | will not be safe. Please do this before deploying an application! + | + */ + + 'key' => env('APP_KEY'), + + 'cipher' => 'AES-256-CBC', + + /* + |-------------------------------------------------------------------------- + | Maintenance Mode Driver + |-------------------------------------------------------------------------- + | + | These configuration options determine the driver used to determine and + | manage Laravel's "maintenance mode" status. The "cache" driver will + | allow maintenance mode to be controlled across multiple machines. + | + | Supported drivers: "file", "cache" + | + */ + + 'maintenance' => [ + 'driver' => 'file', + // 'store' => 'redis', + ], + + /* + |-------------------------------------------------------------------------- + | Autoloaded Service Providers + |-------------------------------------------------------------------------- + | + | The service providers listed here will be automatically loaded on the + | request to your application. Feel free to add your own services to + | this array to grant expanded functionality to your applications. + | + */ + + 'providers' => [ + + /* + * Laravel Framework Service Providers... + */ + Illuminate\Auth\AuthServiceProvider::class, + Illuminate\Broadcasting\BroadcastServiceProvider::class, + Illuminate\Bus\BusServiceProvider::class, + Illuminate\Cache\CacheServiceProvider::class, + Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class, + Illuminate\Cookie\CookieServiceProvider::class, + Illuminate\Database\DatabaseServiceProvider::class, + Illuminate\Encryption\EncryptionServiceProvider::class, + Illuminate\Filesystem\FilesystemServiceProvider::class, + Illuminate\Foundation\Providers\FoundationServiceProvider::class, + Illuminate\Hashing\HashServiceProvider::class, + Illuminate\Mail\MailServiceProvider::class, + Illuminate\Notifications\NotificationServiceProvider::class, + Illuminate\Pagination\PaginationServiceProvider::class, + Illuminate\Pipeline\PipelineServiceProvider::class, + Illuminate\Queue\QueueServiceProvider::class, + Illuminate\Redis\RedisServiceProvider::class, + Illuminate\Auth\Passwords\PasswordResetServiceProvider::class, + Illuminate\Session\SessionServiceProvider::class, + Illuminate\Translation\TranslationServiceProvider::class, + Illuminate\Validation\ValidationServiceProvider::class, + Illuminate\View\ViewServiceProvider::class, + + /* + * Package Service Providers... + */ + + /* + * Application Service Providers... + */ + App\Providers\AppServiceProvider::class, + App\Providers\AuthServiceProvider::class, + // App\Providers\BroadcastServiceProvider::class, + App\Providers\EventServiceProvider::class, + App\Providers\RouteServiceProvider::class, + + ], + + /* + |-------------------------------------------------------------------------- + | Class Aliases + |-------------------------------------------------------------------------- + | + | This array of class aliases will be registered when this application + | is started. However, feel free to register as many as you wish as + | the aliases are "lazy" loaded so they don't hinder performance. + | + */ + + 'aliases' => Facade::defaultAliases()->merge([ + // 'ExampleClass' => App\Example\ExampleClass::class, + ])->toArray(), + +]; diff --git a/backup/config/auth.php b/backup/config/auth.php new file mode 100644 index 0000000..9548c15 --- /dev/null +++ b/backup/config/auth.php @@ -0,0 +1,115 @@ + [ + 'guard' => 'web', + 'passwords' => 'users', + ], + + /* + |-------------------------------------------------------------------------- + | Authentication Guards + |-------------------------------------------------------------------------- + | + | Next, you may define every authentication guard for your application. + | Of course, a great default configuration has been defined for you + | here which uses session storage and the Eloquent user provider. + | + | All authentication drivers have a user provider. This defines how the + | users are actually retrieved out of your database or other storage + | mechanisms used by this application to persist your user's data. + | + | Supported: "session" + | + */ + + 'guards' => [ + 'web' => [ + 'driver' => 'session', + 'provider' => 'users', + ], + ], + + /* + |-------------------------------------------------------------------------- + | User Providers + |-------------------------------------------------------------------------- + | + | All authentication drivers have a user provider. This defines how the + | users are actually retrieved out of your database or other storage + | mechanisms used by this application to persist your user's data. + | + | If you have multiple user tables or models you may configure multiple + | sources which represent each model / table. These sources may then + | be assigned to any extra authentication guards you have defined. + | + | Supported: "database", "eloquent" + | + */ + + 'providers' => [ + 'users' => [ + 'driver' => 'eloquent', + 'model' => App\Models\User::class, + ], + + // 'users' => [ + // 'driver' => 'database', + // 'table' => 'users', + // ], + ], + + /* + |-------------------------------------------------------------------------- + | Resetting Passwords + |-------------------------------------------------------------------------- + | + | You may specify multiple password reset configurations if you have more + | than one user table or model in the application and you want to have + | separate password reset settings based on the specific user types. + | + | The expiry time is the number of minutes that each reset token will be + | considered valid. This security feature keeps tokens short-lived so + | they have less time to be guessed. You may change this as needed. + | + | The throttle setting is the number of seconds a user must wait before + | generating more password reset tokens. This prevents the user from + | quickly generating a very large amount of password reset tokens. + | + */ + + 'passwords' => [ + 'users' => [ + 'provider' => 'users', + 'table' => 'password_reset_tokens', + 'expire' => 60, + 'throttle' => 60, + ], + ], + + /* + |-------------------------------------------------------------------------- + | Password Confirmation Timeout + |-------------------------------------------------------------------------- + | + | Here you may define the amount of seconds before a password confirmation + | times out and the user is prompted to re-enter their password via the + | confirmation screen. By default, the timeout lasts for three hours. + | + */ + + 'password_timeout' => 10800, + +]; diff --git a/backup/config/broadcasting.php b/backup/config/broadcasting.php new file mode 100644 index 0000000..9e4d4aa --- /dev/null +++ b/backup/config/broadcasting.php @@ -0,0 +1,70 @@ + env('BROADCAST_DRIVER', 'null'), + + /* + |-------------------------------------------------------------------------- + | Broadcast Connections + |-------------------------------------------------------------------------- + | + | Here you may define all of the broadcast connections that will be used + | to broadcast events to other systems or over websockets. Samples of + | each available type of connection are provided inside this array. + | + */ + + 'connections' => [ + + 'pusher' => [ + 'driver' => 'pusher', + 'key' => env('PUSHER_APP_KEY'), + 'secret' => env('PUSHER_APP_SECRET'), + 'app_id' => env('PUSHER_APP_ID'), + 'options' => [ + 'host' => env('PUSHER_HOST') ?: 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com', + 'port' => env('PUSHER_PORT', 443), + 'scheme' => env('PUSHER_SCHEME', 'https'), + 'encrypted' => true, + 'useTLS' => env('PUSHER_SCHEME', 'https') === 'https', + ], + 'client_options' => [ + // Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html + ], + ], + + 'ably' => [ + 'driver' => 'ably', + 'key' => env('ABLY_KEY'), + ], + + 'redis' => [ + 'driver' => 'redis', + 'connection' => 'default', + ], + + 'log' => [ + 'driver' => 'log', + ], + + 'null' => [ + 'driver' => 'null', + ], + + ], + +]; diff --git a/backup/config/cache.php b/backup/config/cache.php new file mode 100644 index 0000000..33bb295 --- /dev/null +++ b/backup/config/cache.php @@ -0,0 +1,110 @@ + env('CACHE_DRIVER', 'file'), + + /* + |-------------------------------------------------------------------------- + | Cache Stores + |-------------------------------------------------------------------------- + | + | Here you may define all of the cache "stores" for your application as + | well as their drivers. You may even define multiple stores for the + | same cache driver to group types of items stored in your caches. + | + | Supported drivers: "apc", "array", "database", "file", + | "memcached", "redis", "dynamodb", "octane", "null" + | + */ + + 'stores' => [ + + 'apc' => [ + 'driver' => 'apc', + ], + + 'array' => [ + 'driver' => 'array', + 'serialize' => false, + ], + + 'database' => [ + 'driver' => 'database', + 'table' => 'cache', + 'connection' => null, + 'lock_connection' => null, + ], + + 'file' => [ + 'driver' => 'file', + 'path' => storage_path('framework/cache/data'), + ], + + 'memcached' => [ + 'driver' => 'memcached', + 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), + 'sasl' => [ + env('MEMCACHED_USERNAME'), + env('MEMCACHED_PASSWORD'), + ], + 'options' => [ + // Memcached::OPT_CONNECT_TIMEOUT => 2000, + ], + 'servers' => [ + [ + 'host' => env('MEMCACHED_HOST', '127.0.0.1'), + 'port' => env('MEMCACHED_PORT', 11211), + 'weight' => 100, + ], + ], + ], + + 'redis' => [ + 'driver' => 'redis', + 'connection' => 'cache', + 'lock_connection' => 'default', + ], + + 'dynamodb' => [ + 'driver' => 'dynamodb', + 'key' => env('AWS_ACCESS_KEY_ID'), + 'secret' => env('AWS_SECRET_ACCESS_KEY'), + 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), + 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), + 'endpoint' => env('DYNAMODB_ENDPOINT'), + ], + + 'octane' => [ + 'driver' => 'octane', + ], + + ], + + /* + |-------------------------------------------------------------------------- + | Cache Key Prefix + |-------------------------------------------------------------------------- + | + | When utilizing the APC, database, memcached, Redis, or DynamoDB cache + | stores there might be other applications using the same cache. For + | that reason, you may prefix every cache key to avoid collisions. + | + */ + + 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'), + +]; diff --git a/backup/config/cors.php b/backup/config/cors.php new file mode 100644 index 0000000..8a39e6d --- /dev/null +++ b/backup/config/cors.php @@ -0,0 +1,34 @@ + ['api/*', 'sanctum/csrf-cookie'], + + 'allowed_methods' => ['*'], + + 'allowed_origins' => ['*'], + + 'allowed_origins_patterns' => [], + + 'allowed_headers' => ['*'], + + 'exposed_headers' => [], + + 'max_age' => 0, + + 'supports_credentials' => false, + +]; diff --git a/backup/config/database.php b/backup/config/database.php new file mode 100644 index 0000000..137ad18 --- /dev/null +++ b/backup/config/database.php @@ -0,0 +1,151 @@ + env('DB_CONNECTION', 'mysql'), + + /* + |-------------------------------------------------------------------------- + | Database Connections + |-------------------------------------------------------------------------- + | + | Here are each of the database connections setup for your application. + | Of course, examples of configuring each database platform that is + | supported by Laravel is shown below to make development simple. + | + | + | All database work in Laravel is done through the PHP PDO facilities + | so make sure you have the driver for your particular database of + | choice installed on your machine before you begin development. + | + */ + + 'connections' => [ + + 'sqlite' => [ + 'driver' => 'sqlite', + 'url' => env('DATABASE_URL'), + 'database' => env('DB_DATABASE', database_path('database.sqlite')), + 'prefix' => '', + 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), + ], + + 'mysql' => [ + 'driver' => 'mysql', + 'url' => env('DATABASE_URL'), + 'host' => env('DB_HOST', '127.0.0.1'), + 'port' => env('DB_PORT', '3306'), + 'database' => env('DB_DATABASE', 'forge'), + 'username' => env('DB_USERNAME', 'forge'), + 'password' => env('DB_PASSWORD', ''), + 'unix_socket' => env('DB_SOCKET', ''), + 'charset' => 'utf8mb4', + 'collation' => 'utf8mb4_unicode_ci', + 'prefix' => '', + 'prefix_indexes' => true, + 'strict' => true, + 'engine' => null, + 'options' => extension_loaded('pdo_mysql') ? array_filter([ + PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), + ]) : [], + ], + + 'pgsql' => [ + 'driver' => 'pgsql', + 'url' => env('DATABASE_URL'), + 'host' => env('DB_HOST', '127.0.0.1'), + 'port' => env('DB_PORT', '5432'), + 'database' => env('DB_DATABASE', 'forge'), + 'username' => env('DB_USERNAME', 'forge'), + 'password' => env('DB_PASSWORD', ''), + 'charset' => 'utf8', + 'prefix' => '', + 'prefix_indexes' => true, + 'search_path' => 'public', + 'sslmode' => 'prefer', + ], + + 'sqlsrv' => [ + 'driver' => 'sqlsrv', + 'url' => env('DATABASE_URL'), + 'host' => env('DB_HOST', 'localhost'), + 'port' => env('DB_PORT', '1433'), + 'database' => env('DB_DATABASE', 'forge'), + 'username' => env('DB_USERNAME', 'forge'), + 'password' => env('DB_PASSWORD', ''), + 'charset' => 'utf8', + 'prefix' => '', + 'prefix_indexes' => true, + // 'encrypt' => env('DB_ENCRYPT', 'yes'), + // 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'), + ], + + ], + + /* + |-------------------------------------------------------------------------- + | Migration Repository Table + |-------------------------------------------------------------------------- + | + | This table keeps track of all the migrations that have already run for + | your application. Using this information, we can determine which of + | the migrations on disk haven't actually been run in the database. + | + */ + + 'migrations' => 'migrations', + + /* + |-------------------------------------------------------------------------- + | Redis Databases + |-------------------------------------------------------------------------- + | + | Redis is an open source, fast, and advanced key-value store that also + | provides a richer body of commands than a typical key-value system + | such as APC or Memcached. Laravel makes it easy to dig right in. + | + */ + + 'redis' => [ + + 'client' => env('REDIS_CLIENT', 'phpredis'), + + 'options' => [ + 'cluster' => env('REDIS_CLUSTER', 'redis'), + 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'), + ], + + 'default' => [ + 'url' => env('REDIS_URL'), + 'host' => env('REDIS_HOST', '127.0.0.1'), + 'username' => env('REDIS_USERNAME'), + 'password' => env('REDIS_PASSWORD'), + 'port' => env('REDIS_PORT', '6379'), + 'database' => env('REDIS_DB', '0'), + ], + + 'cache' => [ + 'url' => env('REDIS_URL'), + 'host' => env('REDIS_HOST', '127.0.0.1'), + 'username' => env('REDIS_USERNAME'), + 'password' => env('REDIS_PASSWORD'), + 'port' => env('REDIS_PORT', '6379'), + 'database' => env('REDIS_CACHE_DB', '1'), + ], + + ], + +]; diff --git a/backup/config/filesystems.php b/backup/config/filesystems.php new file mode 100644 index 0000000..d47801b --- /dev/null +++ b/backup/config/filesystems.php @@ -0,0 +1,152 @@ + env('FILESYSTEM_DISK', 'local'), + + + + /* + + |-------------------------------------------------------------------------- + + | Filesystem Disks + + |-------------------------------------------------------------------------- + + | + + | Here you may configure as many filesystem "disks" as you wish, and you + + | may even configure multiple disks of the same driver. Defaults have + + | been set up for each driver as an example of the required values. + + | + + | Supported Drivers: "local", "ftp", "sftp", "s3" + + | + + */ + + + + 'disks' => [ + + + + 'local' => [ + + 'driver' => 'local', + + 'root' => storage_path('app'), + + 'throw' => false, + + ], + + + + 'public' => [ + + 'driver' => 'local', + + 'root' => storage_path('app/public'), + + 'url' => env('APP_URL').'/storage', + + 'visibility' => 'public', + + 'throw' => false, + + ], + + + + 's3' => [ + + 'driver' => 's3', + + 'key' => env('AWS_ACCESS_KEY_ID'), + + 'secret' => env('AWS_SECRET_ACCESS_KEY'), + + 'region' => env('AWS_DEFAULT_REGION'), + + 'bucket' => env('AWS_BUCKET'), + + 'url' => env('AWS_URL'), + + 'endpoint' => env('AWS_ENDPOINT'), + + 'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false), + + 'throw' => false, + + ], + + + + ], + + + + /* + + |-------------------------------------------------------------------------- + + | Symbolic Links + + |-------------------------------------------------------------------------- + + | + + | Here you may configure the symbolic links that will be created when the + + | `storage:link` Artisan command is executed. The array keys should be + + | the locations of the links and the values should be their targets. + + | + + */ + + + + 'links' => [ + + public_path('storage') => storage_path('app/public'), + + ], + + + +]; + diff --git a/backup/config/global.php b/backup/config/global.php new file mode 100644 index 0000000..ad0b279 --- /dev/null +++ b/backup/config/global.php @@ -0,0 +1,21 @@ + [ + 'init'=> 'INITIAL PAYMENT', + '01-01-2023' => 'January 2023', + '01-02-2023'=> 'February 2023', + '01-03-2023' => 'March 2023', + '01-04-2023'=> 'April 2023', + '01-05-2023' => 'May 2023', + '01-06-2023' => 'June 2023', + '01-07-2023' =>'July 2023', + '01-08-2023' => 'August 2023', + '01-09-2023' => 'September 2023', + '01-10-2023' => 'October 2023', + '01-11-2023' => 'November 2023', + '01-12-2023' => 'December 2023' + ] +]; +?> diff --git a/backup/config/hashing.php b/backup/config/hashing.php new file mode 100644 index 0000000..bcd3be4 --- /dev/null +++ b/backup/config/hashing.php @@ -0,0 +1,52 @@ + 'bcrypt', + + /* + |-------------------------------------------------------------------------- + | Bcrypt Options + |-------------------------------------------------------------------------- + | + | Here you may specify the configuration options that should be used when + | passwords are hashed using the Bcrypt algorithm. This will allow you + | to control the amount of time it takes to hash the given password. + | + */ + + 'bcrypt' => [ + 'rounds' => env('BCRYPT_ROUNDS', 10), + ], + + /* + |-------------------------------------------------------------------------- + | Argon Options + |-------------------------------------------------------------------------- + | + | Here you may specify the configuration options that should be used when + | passwords are hashed using the Argon algorithm. These will allow you + | to control the amount of time it takes to hash the given password. + | + */ + + 'argon' => [ + 'memory' => 65536, + 'threads' => 1, + 'time' => 4, + ], + +]; diff --git a/backup/config/logging.php b/backup/config/logging.php new file mode 100644 index 0000000..4c3df4c --- /dev/null +++ b/backup/config/logging.php @@ -0,0 +1,123 @@ + env('LOG_CHANNEL', 'stack'), + + /* + |-------------------------------------------------------------------------- + | Deprecations Log Channel + |-------------------------------------------------------------------------- + | + | This option controls the log channel that should be used to log warnings + | regarding deprecated PHP and library features. This allows you to get + | your application ready for upcoming major versions of dependencies. + | + */ + + 'deprecations' => [ + 'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'), + 'trace' => false, + ], + + /* + |-------------------------------------------------------------------------- + | Log Channels + |-------------------------------------------------------------------------- + | + | Here you may configure the log channels for your application. Out of + | the box, Laravel uses the Monolog PHP logging library. This gives + | you a variety of powerful log handlers / formatters to utilize. + | + | Available Drivers: "single", "daily", "slack", "syslog", + | "errorlog", "monolog", + | "custom", "stack" + | + */ + + 'channels' => [ + 'stack' => [ + 'driver' => 'stack', + 'channels' => ['single'], + 'ignore_exceptions' => false, + ], + + 'single' => [ + 'driver' => 'single', + 'path' => storage_path('logs/laravel.log'), + 'level' => env('LOG_LEVEL', 'debug'), + ], + + 'daily' => [ + 'driver' => 'daily', + 'path' => storage_path('logs/laravel.log'), + 'level' => env('LOG_LEVEL', 'debug'), + 'days' => 14, + ], + + 'slack' => [ + 'driver' => 'slack', + 'url' => env('LOG_SLACK_WEBHOOK_URL'), + 'username' => 'Laravel Log', + 'emoji' => ':boom:', + 'level' => env('LOG_LEVEL', 'critical'), + ], + + 'papertrail' => [ + 'driver' => 'monolog', + 'level' => env('LOG_LEVEL', 'debug'), + 'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class), + 'handler_with' => [ + 'host' => env('PAPERTRAIL_URL'), + 'port' => env('PAPERTRAIL_PORT'), + 'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'), + ], + ], + + 'stderr' => [ + 'driver' => 'monolog', + 'level' => env('LOG_LEVEL', 'debug'), + 'handler' => StreamHandler::class, + 'formatter' => env('LOG_STDERR_FORMATTER'), + 'with' => [ + 'stream' => 'php://stderr', + ], + ], + + 'syslog' => [ + 'driver' => 'syslog', + 'level' => env('LOG_LEVEL', 'debug'), + 'facility' => LOG_USER, + ], + + 'errorlog' => [ + 'driver' => 'errorlog', + 'level' => env('LOG_LEVEL', 'debug'), + ], + + 'null' => [ + 'driver' => 'monolog', + 'handler' => NullHandler::class, + ], + + 'emergency' => [ + 'path' => storage_path('logs/laravel.log'), + ], + ], + +]; diff --git a/backup/config/mail.php b/backup/config/mail.php new file mode 100644 index 0000000..542d98c --- /dev/null +++ b/backup/config/mail.php @@ -0,0 +1,124 @@ + env('MAIL_MAILER', 'smtp'), + + /* + |-------------------------------------------------------------------------- + | Mailer Configurations + |-------------------------------------------------------------------------- + | + | Here you may configure all of the mailers used by your application plus + | their respective settings. Several examples have been configured for + | you and you are free to add your own as your application requires. + | + | Laravel supports a variety of mail "transport" drivers to be used while + | sending an e-mail. You will specify which one you are using for your + | mailers below. You are free to add additional mailers as required. + | + | Supported: "smtp", "sendmail", "mailgun", "ses", "ses-v2", + | "postmark", "log", "array", "failover" + | + */ + + 'mailers' => [ + 'smtp' => [ + 'transport' => 'smtp', + 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), + 'port' => env('MAIL_PORT', 587), + 'encryption' => env('MAIL_ENCRYPTION', 'tls'), + 'username' => env('MAIL_USERNAME'), + 'password' => env('MAIL_PASSWORD'), + 'timeout' => null, + 'local_domain' => env('MAIL_EHLO_DOMAIN'), + ], + + 'ses' => [ + 'transport' => 'ses', + ], + + 'mailgun' => [ + 'transport' => 'mailgun', + // 'client' => [ + // 'timeout' => 5, + // ], + ], + + 'postmark' => [ + 'transport' => 'postmark', + // 'client' => [ + // 'timeout' => 5, + // ], + ], + + 'sendmail' => [ + 'transport' => 'sendmail', + 'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'), + ], + + 'log' => [ + 'transport' => 'log', + 'channel' => env('MAIL_LOG_CHANNEL'), + ], + + 'array' => [ + 'transport' => 'array', + ], + + 'failover' => [ + 'transport' => 'failover', + 'mailers' => [ + 'smtp', + 'log', + ], + ], + ], + + /* + |-------------------------------------------------------------------------- + | Global "From" Address + |-------------------------------------------------------------------------- + | + | You may wish for all e-mails sent by your application to be sent from + | the same address. Here, you may specify a name and address that is + | used globally for all e-mails that are sent by your application. + | + */ + + 'from' => [ + 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), + 'name' => env('MAIL_FROM_NAME', 'Example'), + ], + + /* + |-------------------------------------------------------------------------- + | Markdown Mail Settings + |-------------------------------------------------------------------------- + | + | If you are using Markdown based email rendering, you may configure your + | theme and component paths here, allowing you to customize the design + | of the emails. Or, you may simply stick with the Laravel defaults! + | + */ + + 'markdown' => [ + 'theme' => 'default', + + 'paths' => [ + resource_path('views/vendor/mail'), + ], + ], + +]; diff --git a/backup/config/queue.php b/backup/config/queue.php new file mode 100644 index 0000000..25ea5a8 --- /dev/null +++ b/backup/config/queue.php @@ -0,0 +1,93 @@ + env('QUEUE_CONNECTION', 'sync'), + + /* + |-------------------------------------------------------------------------- + | Queue Connections + |-------------------------------------------------------------------------- + | + | Here you may configure the connection information for each server that + | is used by your application. A default configuration has been added + | for each back-end shipped with Laravel. You are free to add more. + | + | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null" + | + */ + + 'connections' => [ + + 'sync' => [ + 'driver' => 'sync', + ], + + 'database' => [ + 'driver' => 'database', + 'table' => 'jobs', + 'queue' => 'default', + 'retry_after' => 90, + 'after_commit' => false, + ], + + 'beanstalkd' => [ + 'driver' => 'beanstalkd', + 'host' => 'localhost', + 'queue' => 'default', + 'retry_after' => 90, + 'block_for' => 0, + 'after_commit' => false, + ], + + 'sqs' => [ + 'driver' => 'sqs', + 'key' => env('AWS_ACCESS_KEY_ID'), + 'secret' => env('AWS_SECRET_ACCESS_KEY'), + 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), + 'queue' => env('SQS_QUEUE', 'default'), + 'suffix' => env('SQS_SUFFIX'), + 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), + 'after_commit' => false, + ], + + 'redis' => [ + 'driver' => 'redis', + 'connection' => 'default', + 'queue' => env('REDIS_QUEUE', 'default'), + 'retry_after' => 90, + 'block_for' => null, + 'after_commit' => false, + ], + + ], + + /* + |-------------------------------------------------------------------------- + | Failed Queue Jobs + |-------------------------------------------------------------------------- + | + | These options configure the behavior of failed queue job logging so you + | can control which database and table are used to store the jobs that + | have failed. You may change them to any database / table you wish. + | + */ + + 'failed' => [ + 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'), + 'database' => env('DB_CONNECTION', 'mysql'), + 'table' => 'failed_jobs', + ], + +]; diff --git a/backup/config/sanctum.php b/backup/config/sanctum.php new file mode 100644 index 0000000..529cfdc --- /dev/null +++ b/backup/config/sanctum.php @@ -0,0 +1,67 @@ + explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf( + '%s%s', + 'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1', + Sanctum::currentApplicationUrlWithPort() + ))), + + /* + |-------------------------------------------------------------------------- + | Sanctum Guards + |-------------------------------------------------------------------------- + | + | This array contains the authentication guards that will be checked when + | Sanctum is trying to authenticate a request. If none of these guards + | are able to authenticate the request, Sanctum will use the bearer + | token that's present on an incoming request for authentication. + | + */ + + 'guard' => ['web'], + + /* + |-------------------------------------------------------------------------- + | Expiration Minutes + |-------------------------------------------------------------------------- + | + | This value controls the number of minutes until an issued token will be + | considered expired. If this value is null, personal access tokens do + | not expire. This won't tweak the lifetime of first-party sessions. + | + */ + + 'expiration' => null, + + /* + |-------------------------------------------------------------------------- + | Sanctum Middleware + |-------------------------------------------------------------------------- + | + | When authenticating your first-party SPA with Sanctum you may need to + | customize some of the middleware Sanctum uses while processing the + | request. You may change the middleware listed below as required. + | + */ + + 'middleware' => [ + 'verify_csrf_token' => App\Http\Middleware\VerifyCsrfToken::class, + 'encrypt_cookies' => App\Http\Middleware\EncryptCookies::class, + ], + +]; diff --git a/backup/config/services.php b/backup/config/services.php new file mode 100644 index 0000000..0ace530 --- /dev/null +++ b/backup/config/services.php @@ -0,0 +1,34 @@ + [ + 'domain' => env('MAILGUN_DOMAIN'), + 'secret' => env('MAILGUN_SECRET'), + 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), + 'scheme' => 'https', + ], + + 'postmark' => [ + 'token' => env('POSTMARK_TOKEN'), + ], + + 'ses' => [ + 'key' => env('AWS_ACCESS_KEY_ID'), + 'secret' => env('AWS_SECRET_ACCESS_KEY'), + 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), + ], + +]; diff --git a/backup/config/session.php b/backup/config/session.php new file mode 100644 index 0000000..8fed97c --- /dev/null +++ b/backup/config/session.php @@ -0,0 +1,201 @@ + env('SESSION_DRIVER', 'file'), + + /* + |-------------------------------------------------------------------------- + | Session Lifetime + |-------------------------------------------------------------------------- + | + | Here you may specify the number of minutes that you wish the session + | to be allowed to remain idle before it expires. If you want them + | to immediately expire on the browser closing, set that option. + | + */ + + 'lifetime' => env('SESSION_LIFETIME', 120), + + 'expire_on_close' => false, + + /* + |-------------------------------------------------------------------------- + | Session Encryption + |-------------------------------------------------------------------------- + | + | This option allows you to easily specify that all of your session data + | should be encrypted before it is stored. All encryption will be run + | automatically by Laravel and you can use the Session like normal. + | + */ + + 'encrypt' => false, + + /* + |-------------------------------------------------------------------------- + | Session File Location + |-------------------------------------------------------------------------- + | + | When using the native session driver, we need a location where session + | files may be stored. A default has been set for you but a different + | location may be specified. This is only needed for file sessions. + | + */ + + 'files' => storage_path('framework/sessions'), + + /* + |-------------------------------------------------------------------------- + | Session Database Connection + |-------------------------------------------------------------------------- + | + | When using the "database" or "redis" session drivers, you may specify a + | connection that should be used to manage these sessions. This should + | correspond to a connection in your database configuration options. + | + */ + + 'connection' => env('SESSION_CONNECTION'), + + /* + |-------------------------------------------------------------------------- + | Session Database Table + |-------------------------------------------------------------------------- + | + | When using the "database" session driver, you may specify the table we + | should use to manage the sessions. Of course, a sensible default is + | provided for you; however, you are free to change this as needed. + | + */ + + 'table' => 'sessions', + + /* + |-------------------------------------------------------------------------- + | Session Cache Store + |-------------------------------------------------------------------------- + | + | While using one of the framework's cache driven session backends you may + | list a cache store that should be used for these sessions. This value + | must match with one of the application's configured cache "stores". + | + | Affects: "apc", "dynamodb", "memcached", "redis" + | + */ + + 'store' => env('SESSION_STORE'), + + /* + |-------------------------------------------------------------------------- + | Session Sweeping Lottery + |-------------------------------------------------------------------------- + | + | Some session drivers must manually sweep their storage location to get + | rid of old sessions from storage. Here are the chances that it will + | happen on a given request. By default, the odds are 2 out of 100. + | + */ + + 'lottery' => [2, 100], + + /* + |-------------------------------------------------------------------------- + | Session Cookie Name + |-------------------------------------------------------------------------- + | + | Here you may change the name of the cookie used to identify a session + | instance by ID. The name specified here will get used every time a + | new session cookie is created by the framework for every driver. + | + */ + + 'cookie' => env( + 'SESSION_COOKIE', + Str::slug(env('APP_NAME', 'laravel'), '_').'_session' + ), + + /* + |-------------------------------------------------------------------------- + | Session Cookie Path + |-------------------------------------------------------------------------- + | + | The session cookie path determines the path for which the cookie will + | be regarded as available. Typically, this will be the root path of + | your application but you are free to change this when necessary. + | + */ + + 'path' => '/', + + /* + |-------------------------------------------------------------------------- + | Session Cookie Domain + |-------------------------------------------------------------------------- + | + | Here you may change the domain of the cookie used to identify a session + | in your application. This will determine which domains the cookie is + | available to in your application. A sensible default has been set. + | + */ + + 'domain' => env('SESSION_DOMAIN'), + + /* + |-------------------------------------------------------------------------- + | HTTPS Only Cookies + |-------------------------------------------------------------------------- + | + | By setting this option to true, session cookies will only be sent back + | to the server if the browser has a HTTPS connection. This will keep + | the cookie from being sent to you when it can't be done securely. + | + */ + + 'secure' => env('SESSION_SECURE_COOKIE'), + + /* + |-------------------------------------------------------------------------- + | HTTP Access Only + |-------------------------------------------------------------------------- + | + | Setting this value to true will prevent JavaScript from accessing the + | value of the cookie and the cookie will only be accessible through + | the HTTP protocol. You are free to modify this option if needed. + | + */ + + 'http_only' => true, + + /* + |-------------------------------------------------------------------------- + | Same-Site Cookies + |-------------------------------------------------------------------------- + | + | This option determines how your cookies behave when cross-site requests + | take place, and can be used to mitigate CSRF attacks. By default, we + | will set this value to "lax" since this is a secure default value. + | + | Supported: "lax", "strict", "none", null + | + */ + + 'same_site' => 'lax', + +]; diff --git a/backup/config/view.php b/backup/config/view.php new file mode 100644 index 0000000..22b8a18 --- /dev/null +++ b/backup/config/view.php @@ -0,0 +1,36 @@ + [ + resource_path('views'), + ], + + /* + |-------------------------------------------------------------------------- + | Compiled View Path + |-------------------------------------------------------------------------- + | + | This option determines where all the compiled Blade templates will be + | stored for your application. Typically, this is within the storage + | directory. However, as usual, you are free to change this value. + | + */ + + 'compiled' => env( + 'VIEW_COMPILED_PATH', + realpath(storage_path('framework/views')) + ), + +]; diff --git a/backup/database/.gitignore b/backup/database/.gitignore new file mode 100644 index 0000000..9b19b93 --- /dev/null +++ b/backup/database/.gitignore @@ -0,0 +1 @@ +*.sqlite* diff --git a/backup/database/factories/HouseFactory.php b/backup/database/factories/HouseFactory.php new file mode 100644 index 0000000..6e5ae9d --- /dev/null +++ b/backup/database/factories/HouseFactory.php @@ -0,0 +1,23 @@ + + */ +class HouseFactory extends Factory +{ + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + return [ + // + ]; + } +} diff --git a/backup/database/factories/SocietyFactory.php b/backup/database/factories/SocietyFactory.php new file mode 100644 index 0000000..be6d6d1 --- /dev/null +++ b/backup/database/factories/SocietyFactory.php @@ -0,0 +1,23 @@ + + */ +class SocietyFactory extends Factory +{ + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + return [ + // + ]; + } +} diff --git a/backup/database/factories/UserFactory.php b/backup/database/factories/UserFactory.php new file mode 100644 index 0000000..a6ecc0a --- /dev/null +++ b/backup/database/factories/UserFactory.php @@ -0,0 +1,38 @@ + + */ +class UserFactory extends Factory +{ + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + return [ + 'name' => fake()->name(), + 'email' => fake()->unique()->safeEmail(), + 'email_verified_at' => now(), + 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password + 'remember_token' => Str::random(10), + ]; + } + + /** + * Indicate that the model's email address should be unverified. + */ + public function unverified(): static + { + return $this->state(fn (array $attributes) => [ + 'email_verified_at' => null, + ]); + } +} diff --git a/backup/database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php b/backup/database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php new file mode 100644 index 0000000..81a7229 --- /dev/null +++ b/backup/database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php @@ -0,0 +1,28 @@ +string('email')->primary(); + $table->string('token'); + $table->timestamp('created_at')->nullable(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('password_reset_tokens'); + } +}; diff --git a/backup/database/migrations/2019_08_19_000000_create_failed_jobs_table.php b/backup/database/migrations/2019_08_19_000000_create_failed_jobs_table.php new file mode 100644 index 0000000..249da81 --- /dev/null +++ b/backup/database/migrations/2019_08_19_000000_create_failed_jobs_table.php @@ -0,0 +1,32 @@ +id(); + $table->string('uuid')->unique(); + $table->text('connection'); + $table->text('queue'); + $table->longText('payload'); + $table->longText('exception'); + $table->timestamp('failed_at')->useCurrent(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('failed_jobs'); + } +}; diff --git a/backup/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php b/backup/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php new file mode 100644 index 0000000..2840f45 --- /dev/null +++ b/backup/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php @@ -0,0 +1,35 @@ + + +id(); + $table->morphs('tokenable'); + $table->string('name'); + $table->string('token', 64)->unique(); + $table->text('abilities')->nullable(); + $table->timestamp('last_used_at')->nullable(); + $table->timestamp('expires_at')->nullable(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('personal_access_tokens'); + } +}; diff --git a/backup/database/migrations/2023_03_21_101018_create_societies_table.php b/backup/database/migrations/2023_03_21_101018_create_societies_table.php new file mode 100644 index 0000000..7127670 --- /dev/null +++ b/backup/database/migrations/2023_03_21_101018_create_societies_table.php @@ -0,0 +1,31 @@ +id(); + $table->string('name'); + $table->text('description'); + $table->string('country'); + $table->string('state'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('societies'); + } +}; diff --git a/backup/database/migrations/2023_03_22_094537_create_usertype_table.php b/backup/database/migrations/2023_03_22_094537_create_usertype_table.php new file mode 100644 index 0000000..647eef5 --- /dev/null +++ b/backup/database/migrations/2023_03_22_094537_create_usertype_table.php @@ -0,0 +1,29 @@ +id(); + $table->string('role'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('usertype'); + } +}; + diff --git a/backup/database/migrations/2023_03_22_103138_create_residents_table.php b/backup/database/migrations/2023_03_22_103138_create_residents_table.php new file mode 100644 index 0000000..bb97c38 --- /dev/null +++ b/backup/database/migrations/2023_03_22_103138_create_residents_table.php @@ -0,0 +1,31 @@ +id(); + $table->integer('user_id'); + $table->integer('house_id'); + $table->boolean('isOwner')->default(false); + $table->string('datofoccupancy'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('residents'); + } +}; diff --git a/backup/database/migrations/2023_03_24_053602_create_payment_modes_table.php b/backup/database/migrations/2023_03_24_053602_create_payment_modes_table.php new file mode 100644 index 0000000..6cd1cc8 --- /dev/null +++ b/backup/database/migrations/2023_03_24_053602_create_payment_modes_table.php @@ -0,0 +1,28 @@ +id(); + $table->string('name'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('payment_modes'); + } +}; diff --git a/backup/database/migrations/2023_03_24_094742_create_payments_table.php b/backup/database/migrations/2023_03_24_094742_create_payments_table.php new file mode 100644 index 0000000..e6affce --- /dev/null +++ b/backup/database/migrations/2023_03_24_094742_create_payments_table.php @@ -0,0 +1,33 @@ +id(); + $table->integer('house_id'); + $table->string('billingmonth'); + $table->foreignid('payment_modes_id')->constrained(); + $table->string('dateofdeposit'); + $table->text('comments')->nullable(); + $table->decimal('amount'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('payments'); + } +}; diff --git a/backup/database/migrations/2023_03_28_072007_create_expenses_table.php b/backup/database/migrations/2023_03_28_072007_create_expenses_table.php new file mode 100644 index 0000000..856dbac --- /dev/null +++ b/backup/database/migrations/2023_03_28_072007_create_expenses_table.php @@ -0,0 +1,32 @@ +id(); + $table->string('payee'); + $table->decimal('amount'); + $table->string('dateofpayment'); + $table->foreignid('payment_modes_id')->constrained(); + $table->text('comments')->nullable(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('expenses'); + } +}; diff --git a/backup/database/seeders/DatabaseSeeder.php b/backup/database/seeders/DatabaseSeeder.php new file mode 100644 index 0000000..349b6c0 --- /dev/null +++ b/backup/database/seeders/DatabaseSeeder.php @@ -0,0 +1,27 @@ +call([ + SocietySeeder::class, + UserTypeSeeder::class, + UserSeeder::class, + PaymentModeSeeder::class + + ]); + } +} diff --git a/backup/database/seeders/PaymentModeSeeder.php b/backup/database/seeders/PaymentModeSeeder.php new file mode 100644 index 0000000..f61b1a1 --- /dev/null +++ b/backup/database/seeders/PaymentModeSeeder.php @@ -0,0 +1,33 @@ +insert([ + 'name' => 'Bank Account', + ]); + DB::table('payment_modes')->insert([ + 'name' => 'Cash', + ]); + DB::table('payment_modes')->insert([ + 'name' => 'GPay', + ]); + DB::table('payment_modes')->insert([ + 'name' => 'PayTM', + ]); + DB::table('payment_modes')->insert([ + 'name' => 'Others', + ]); + } +} diff --git a/backup/database/seeders/SocietySeeder.php b/backup/database/seeders/SocietySeeder.php new file mode 100644 index 0000000..d5f04fc --- /dev/null +++ b/backup/database/seeders/SocietySeeder.php @@ -0,0 +1,24 @@ +insert([ + 'name' => 'Bestech', + 'description' => 'abcde', + 'country' => 'India', + 'state' => 'Mohali' + ]); + } +} diff --git a/backup/database/seeders/UserSeeder.php b/backup/database/seeders/UserSeeder.php new file mode 100644 index 0000000..f81fcc7 --- /dev/null +++ b/backup/database/seeders/UserSeeder.php @@ -0,0 +1,24 @@ +insert([ + 'name' => '54321', + 'password' => Hash::make('#$mishra'), + 'usertype_id' => 1, + 'mobile1' => 1234567890, + ]); + } +} diff --git a/backup/database/seeders/UserTypeSeeder.php b/backup/database/seeders/UserTypeSeeder.php new file mode 100644 index 0000000..a31c361 --- /dev/null +++ b/backup/database/seeders/UserTypeSeeder.php @@ -0,0 +1,26 @@ +insert([ + 'role' => 'Admin', + ]); + DB::table('usertype')->insert([ + 'role' => 'Resident', + ]); + DB::table('usertype')->insert([ + 'role' => 'Moderator', + ]); + } +} diff --git a/backup/img/logo1.png b/backup/img/logo1.png new file mode 100644 index 0000000..8ddb9d3 Binary files /dev/null and b/backup/img/logo1.png differ diff --git a/backup/package-lock.json b/backup/package-lock.json new file mode 100644 index 0000000..cd10638 --- /dev/null +++ b/backup/package-lock.json @@ -0,0 +1,1172 @@ +{ + "name": "society", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "dependencies": { + "sweetalert": "^2.1.2" + }, + "devDependencies": { + "axios": "^1.1.2", + "laravel-vite-plugin": "^0.7.2", + "vite": "^4.0.0" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.15.tgz", + "integrity": "sha512-sRSOVlLawAktpMvDyJIkdLI/c/kdRTOqo8t6ImVxg8yT7LQDUYV5Rp2FKeEosLr6ZCja9UjYAzyRSxGteSJPYg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.15.tgz", + "integrity": "sha512-0kOB6Y7Br3KDVgHeg8PRcvfLkq+AccreK///B4Z6fNZGr/tNHX0z2VywCc7PTeWp+bPvjA5WMvNXltHw5QjAIA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.15.tgz", + "integrity": "sha512-MzDqnNajQZ63YkaUWVl9uuhcWyEyh69HGpMIrf+acR4otMkfLJ4sUCxqwbCyPGicE9dVlrysI3lMcDBjGiBBcQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.15.tgz", + "integrity": "sha512-7siLjBc88Z4+6qkMDxPT2juf2e8SJxmsbNVKFY2ifWCDT72v5YJz9arlvBw5oB4W/e61H1+HDB/jnu8nNg0rLA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.15.tgz", + "integrity": "sha512-NbImBas2rXwYI52BOKTW342Tm3LTeVlaOQ4QPZ7XuWNKiO226DisFk/RyPk3T0CKZkKMuU69yOvlapJEmax7cg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.15.tgz", + "integrity": "sha512-Xk9xMDjBVG6CfgoqlVczHAdJnCs0/oeFOspFap5NkYAmRCT2qTn1vJWA2f419iMtsHSLm+O8B6SLV/HlY5cYKg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.15.tgz", + "integrity": "sha512-3TWAnnEOdclvb2pnfsTWtdwthPfOz7qAfcwDLcfZyGJwm1SRZIMOeB5FODVhnM93mFSPsHB9b/PmxNNbSnd0RQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.15.tgz", + "integrity": "sha512-MLTgiXWEMAMr8nmS9Gigx43zPRmEfeBfGCwxFQEMgJ5MC53QKajaclW6XDPjwJvhbebv+RzK05TQjvH3/aM4Xw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.15.tgz", + "integrity": "sha512-T0MVnYw9KT6b83/SqyznTs/3Jg2ODWrZfNccg11XjDehIved2oQfrX/wVuev9N936BpMRaTR9I1J0tdGgUgpJA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.15.tgz", + "integrity": "sha512-wp02sHs015T23zsQtU4Cj57WiteiuASHlD7rXjKUyAGYzlOKDAjqK6bk5dMi2QEl/KVOcsjwL36kD+WW7vJt8Q==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.15.tgz", + "integrity": "sha512-k7FsUJjGGSxwnBmMh8d7IbObWu+sF/qbwc+xKZkBe/lTAF16RqxRCnNHA7QTd3oS2AfGBAnHlXL67shV5bBThQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.15.tgz", + "integrity": "sha512-ZLWk6czDdog+Q9kE/Jfbilu24vEe/iW/Sj2d8EVsmiixQ1rM2RKH2n36qfxK4e8tVcaXkvuV3mU5zTZviE+NVQ==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.15.tgz", + "integrity": "sha512-mY6dPkIRAiFHRsGfOYZC8Q9rmr8vOBZBme0/j15zFUKM99d4ILY4WpOC7i/LqoY+RE7KaMaSfvY8CqjJtuO4xg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.15.tgz", + "integrity": "sha512-EcyUtxffdDtWjjwIH8sKzpDRLcVtqANooMNASO59y+xmqqRYBBM7xVLQhqF7nksIbm2yHABptoioS9RAbVMWVA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.15.tgz", + "integrity": "sha512-BuS6Jx/ezxFuHxgsfvz7T4g4YlVrmCmg7UAwboeyNNg0OzNzKsIZXpr3Sb/ZREDXWgt48RO4UQRDBxJN3B9Rbg==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.15.tgz", + "integrity": "sha512-JsdS0EgEViwuKsw5tiJQo9UdQdUJYuB+Mf6HxtJSPN35vez1hlrNb1KajvKWF5Sa35j17+rW1ECEO9iNrIXbNg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.15.tgz", + "integrity": "sha512-R6fKjtUysYGym6uXf6qyNephVUQAGtf3n2RCsOST/neIwPqRWcnc3ogcielOd6pT+J0RDR1RGcy0ZY7d3uHVLA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.15.tgz", + "integrity": "sha512-mVD4PGc26b8PI60QaPUltYKeSX0wxuy0AltC+WCTFwvKCq2+OgLP4+fFd+hZXzO2xW1HPKcytZBdjqL6FQFa7w==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.15.tgz", + "integrity": "sha512-U6tYPovOkw3459t2CBwGcFYfFRjivcJJc1WC8Q3funIwX8x4fP+R6xL/QuTPNGOblbq/EUDxj9GU+dWKX0oWlQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.15.tgz", + "integrity": "sha512-W+Z5F++wgKAleDABemiyXVnzXgvRFs+GVKThSI+mGgleLWluv0D7Diz4oQpgdpNzh4i2nNDzQtWbjJiqutRp6Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.15.tgz", + "integrity": "sha512-Muz/+uGgheShKGqSVS1KsHtCyEzcdOn/W/Xbh6H91Etm+wiIfwZaBn1W58MeGtfI8WA961YMHFYTthBdQs4t+w==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.15.tgz", + "integrity": "sha512-DjDa9ywLUUmjhV2Y9wUTIF+1XsmuFGvZoCmOWkli1XcNAh5t25cc7fgsCx4Zi/Uurep3TTLyDiKATgGEg61pkA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true + }, + "node_modules/axios": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.4.tgz", + "integrity": "sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ==", + "dev": true, + "dependencies": { + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/es6-object-assign": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz", + "integrity": "sha512-MEl9uirslVwqQU369iHNWZXsI8yaZYGg/D65aOgZkeyFJwHYSxilf7rQzXKI7DdDuBPrBXbfk3sl9hJhmd5AUw==" + }, + "node_modules/esbuild": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.15.tgz", + "integrity": "sha512-LBUV2VsUIc/iD9ME75qhT4aJj0r75abCVS0jakhFzOtR7TQsqQA5w0tZ+KTKnwl3kXE0MhskNdHDh/I5aCR1Zw==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.17.15", + "@esbuild/android-arm64": "0.17.15", + "@esbuild/android-x64": "0.17.15", + "@esbuild/darwin-arm64": "0.17.15", + "@esbuild/darwin-x64": "0.17.15", + "@esbuild/freebsd-arm64": "0.17.15", + "@esbuild/freebsd-x64": "0.17.15", + "@esbuild/linux-arm": "0.17.15", + "@esbuild/linux-arm64": "0.17.15", + "@esbuild/linux-ia32": "0.17.15", + "@esbuild/linux-loong64": "0.17.15", + "@esbuild/linux-mips64el": "0.17.15", + "@esbuild/linux-ppc64": "0.17.15", + "@esbuild/linux-riscv64": "0.17.15", + "@esbuild/linux-s390x": "0.17.15", + "@esbuild/linux-x64": "0.17.15", + "@esbuild/netbsd-x64": "0.17.15", + "@esbuild/openbsd-x64": "0.17.15", + "@esbuild/sunos-x64": "0.17.15", + "@esbuild/win32-arm64": "0.17.15", + "@esbuild/win32-ia32": "0.17.15", + "@esbuild/win32-x64": "0.17.15" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/is-core-module": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/laravel-vite-plugin": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/laravel-vite-plugin/-/laravel-vite-plugin-0.7.4.tgz", + "integrity": "sha512-NlIuXbeuI+4NZzRpWNpGHRVTwuFWessvD7QoD+o2MlyAi7qyUS4J8r4/yTlu1dl9lxcR7iKoYUmHQqZDcrw2KA==", + "dev": true, + "dependencies": { + "picocolors": "^1.0.0", + "vite-plugin-full-reload": "^1.0.5" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "vite": "^3.0.0 || ^4.0.0" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/nanoid": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", + "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.4.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz", + "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + } + ], + "dependencies": { + "nanoid": "^3.3.4", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/promise-polyfill": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/promise-polyfill/-/promise-polyfill-6.1.0.tgz", + "integrity": "sha512-g0LWaH0gFsxovsU7R5LrrhHhWAWiHRnh1GPrhXnPgYsDkIqjRYUYSZEsej/wtleDrz5xVSIDbeKfidztp2XHFQ==" + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "dev": true + }, + "node_modules/resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/rollup": { + "version": "3.20.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.20.2.tgz", + "integrity": "sha512-3zwkBQl7Ai7MFYQE0y1MeQ15+9jsi7XxfrqwTb/9EK8D9C9+//EBR4M+CuA1KODRaNbFez/lWxA5vhEGZp4MUg==", + "dev": true, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=14.18.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/sweetalert": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/sweetalert/-/sweetalert-2.1.2.tgz", + "integrity": "sha512-iWx7X4anRBNDa/a+AdTmvAzQtkN1+s4j/JJRWlHpYE8Qimkohs8/XnFcWeYHH2lMA8LRCa5tj2d244If3S/hzA==", + "dependencies": { + "es6-object-assign": "^1.1.0", + "promise-polyfill": "^6.0.2" + } + }, + "node_modules/vite": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.2.1.tgz", + "integrity": "sha512-7MKhqdy0ISo4wnvwtqZkjke6XN4taqQ2TBaTccLIpOKv7Vp2h4Y+NpmWCnGDeSvvn45KxvWgGyb0MkHvY1vgbg==", + "dev": true, + "dependencies": { + "esbuild": "^0.17.5", + "postcss": "^8.4.21", + "resolve": "^1.22.1", + "rollup": "^3.18.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + }, + "peerDependencies": { + "@types/node": ">= 14", + "less": "*", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/vite-plugin-full-reload": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/vite-plugin-full-reload/-/vite-plugin-full-reload-1.0.5.tgz", + "integrity": "sha512-kVZFDFWr0DxiHn6MuDVTQf7gnWIdETGlZh0hvTiMXzRN80vgF4PKbONSq8U1d0WtHsKaFODTQgJeakLacoPZEQ==", + "dev": true, + "dependencies": { + "picocolors": "^1.0.0", + "picomatch": "^2.3.1" + }, + "peerDependencies": { + "vite": "^2 || ^3 || ^4" + } + } + }, + "dependencies": { + "@esbuild/android-arm": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.15.tgz", + "integrity": "sha512-sRSOVlLawAktpMvDyJIkdLI/c/kdRTOqo8t6ImVxg8yT7LQDUYV5Rp2FKeEosLr6ZCja9UjYAzyRSxGteSJPYg==", + "dev": true, + "optional": true + }, + "@esbuild/android-arm64": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.15.tgz", + "integrity": "sha512-0kOB6Y7Br3KDVgHeg8PRcvfLkq+AccreK///B4Z6fNZGr/tNHX0z2VywCc7PTeWp+bPvjA5WMvNXltHw5QjAIA==", + "dev": true, + "optional": true + }, + "@esbuild/android-x64": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.15.tgz", + "integrity": "sha512-MzDqnNajQZ63YkaUWVl9uuhcWyEyh69HGpMIrf+acR4otMkfLJ4sUCxqwbCyPGicE9dVlrysI3lMcDBjGiBBcQ==", + "dev": true, + "optional": true + }, + "@esbuild/darwin-arm64": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.15.tgz", + "integrity": "sha512-7siLjBc88Z4+6qkMDxPT2juf2e8SJxmsbNVKFY2ifWCDT72v5YJz9arlvBw5oB4W/e61H1+HDB/jnu8nNg0rLA==", + "dev": true, + "optional": true + }, + "@esbuild/darwin-x64": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.15.tgz", + "integrity": "sha512-NbImBas2rXwYI52BOKTW342Tm3LTeVlaOQ4QPZ7XuWNKiO226DisFk/RyPk3T0CKZkKMuU69yOvlapJEmax7cg==", + "dev": true, + "optional": true + }, + "@esbuild/freebsd-arm64": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.15.tgz", + "integrity": "sha512-Xk9xMDjBVG6CfgoqlVczHAdJnCs0/oeFOspFap5NkYAmRCT2qTn1vJWA2f419iMtsHSLm+O8B6SLV/HlY5cYKg==", + "dev": true, + "optional": true + }, + "@esbuild/freebsd-x64": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.15.tgz", + "integrity": "sha512-3TWAnnEOdclvb2pnfsTWtdwthPfOz7qAfcwDLcfZyGJwm1SRZIMOeB5FODVhnM93mFSPsHB9b/PmxNNbSnd0RQ==", + "dev": true, + "optional": true + }, + "@esbuild/linux-arm": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.15.tgz", + "integrity": "sha512-MLTgiXWEMAMr8nmS9Gigx43zPRmEfeBfGCwxFQEMgJ5MC53QKajaclW6XDPjwJvhbebv+RzK05TQjvH3/aM4Xw==", + "dev": true, + "optional": true + }, + "@esbuild/linux-arm64": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.15.tgz", + "integrity": "sha512-T0MVnYw9KT6b83/SqyznTs/3Jg2ODWrZfNccg11XjDehIved2oQfrX/wVuev9N936BpMRaTR9I1J0tdGgUgpJA==", + "dev": true, + "optional": true + }, + "@esbuild/linux-ia32": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.15.tgz", + "integrity": "sha512-wp02sHs015T23zsQtU4Cj57WiteiuASHlD7rXjKUyAGYzlOKDAjqK6bk5dMi2QEl/KVOcsjwL36kD+WW7vJt8Q==", + "dev": true, + "optional": true + }, + "@esbuild/linux-loong64": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.15.tgz", + "integrity": "sha512-k7FsUJjGGSxwnBmMh8d7IbObWu+sF/qbwc+xKZkBe/lTAF16RqxRCnNHA7QTd3oS2AfGBAnHlXL67shV5bBThQ==", + "dev": true, + "optional": true + }, + "@esbuild/linux-mips64el": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.15.tgz", + "integrity": "sha512-ZLWk6czDdog+Q9kE/Jfbilu24vEe/iW/Sj2d8EVsmiixQ1rM2RKH2n36qfxK4e8tVcaXkvuV3mU5zTZviE+NVQ==", + "dev": true, + "optional": true + }, + "@esbuild/linux-ppc64": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.15.tgz", + "integrity": "sha512-mY6dPkIRAiFHRsGfOYZC8Q9rmr8vOBZBme0/j15zFUKM99d4ILY4WpOC7i/LqoY+RE7KaMaSfvY8CqjJtuO4xg==", + "dev": true, + "optional": true + }, + "@esbuild/linux-riscv64": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.15.tgz", + "integrity": "sha512-EcyUtxffdDtWjjwIH8sKzpDRLcVtqANooMNASO59y+xmqqRYBBM7xVLQhqF7nksIbm2yHABptoioS9RAbVMWVA==", + "dev": true, + "optional": true + }, + "@esbuild/linux-s390x": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.15.tgz", + "integrity": "sha512-BuS6Jx/ezxFuHxgsfvz7T4g4YlVrmCmg7UAwboeyNNg0OzNzKsIZXpr3Sb/ZREDXWgt48RO4UQRDBxJN3B9Rbg==", + "dev": true, + "optional": true + }, + "@esbuild/linux-x64": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.15.tgz", + "integrity": "sha512-JsdS0EgEViwuKsw5tiJQo9UdQdUJYuB+Mf6HxtJSPN35vez1hlrNb1KajvKWF5Sa35j17+rW1ECEO9iNrIXbNg==", + "dev": true, + "optional": true + }, + "@esbuild/netbsd-x64": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.15.tgz", + "integrity": "sha512-R6fKjtUysYGym6uXf6qyNephVUQAGtf3n2RCsOST/neIwPqRWcnc3ogcielOd6pT+J0RDR1RGcy0ZY7d3uHVLA==", + "dev": true, + "optional": true + }, + "@esbuild/openbsd-x64": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.15.tgz", + "integrity": "sha512-mVD4PGc26b8PI60QaPUltYKeSX0wxuy0AltC+WCTFwvKCq2+OgLP4+fFd+hZXzO2xW1HPKcytZBdjqL6FQFa7w==", + "dev": true, + "optional": true + }, + "@esbuild/sunos-x64": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.15.tgz", + "integrity": "sha512-U6tYPovOkw3459t2CBwGcFYfFRjivcJJc1WC8Q3funIwX8x4fP+R6xL/QuTPNGOblbq/EUDxj9GU+dWKX0oWlQ==", + "dev": true, + "optional": true + }, + "@esbuild/win32-arm64": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.15.tgz", + "integrity": "sha512-W+Z5F++wgKAleDABemiyXVnzXgvRFs+GVKThSI+mGgleLWluv0D7Diz4oQpgdpNzh4i2nNDzQtWbjJiqutRp6Q==", + "dev": true, + "optional": true + }, + "@esbuild/win32-ia32": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.15.tgz", + "integrity": "sha512-Muz/+uGgheShKGqSVS1KsHtCyEzcdOn/W/Xbh6H91Etm+wiIfwZaBn1W58MeGtfI8WA961YMHFYTthBdQs4t+w==", + "dev": true, + "optional": true + }, + "@esbuild/win32-x64": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.15.tgz", + "integrity": "sha512-DjDa9ywLUUmjhV2Y9wUTIF+1XsmuFGvZoCmOWkli1XcNAh5t25cc7fgsCx4Zi/Uurep3TTLyDiKATgGEg61pkA==", + "dev": true, + "optional": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true + }, + "axios": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.4.tgz", + "integrity": "sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ==", + "dev": true, + "requires": { + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true + }, + "es6-object-assign": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz", + "integrity": "sha512-MEl9uirslVwqQU369iHNWZXsI8yaZYGg/D65aOgZkeyFJwHYSxilf7rQzXKI7DdDuBPrBXbfk3sl9hJhmd5AUw==" + }, + "esbuild": { + "version": "0.17.15", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.15.tgz", + "integrity": "sha512-LBUV2VsUIc/iD9ME75qhT4aJj0r75abCVS0jakhFzOtR7TQsqQA5w0tZ+KTKnwl3kXE0MhskNdHDh/I5aCR1Zw==", + "dev": true, + "requires": { + "@esbuild/android-arm": "0.17.15", + "@esbuild/android-arm64": "0.17.15", + "@esbuild/android-x64": "0.17.15", + "@esbuild/darwin-arm64": "0.17.15", + "@esbuild/darwin-x64": "0.17.15", + "@esbuild/freebsd-arm64": "0.17.15", + "@esbuild/freebsd-x64": "0.17.15", + "@esbuild/linux-arm": "0.17.15", + "@esbuild/linux-arm64": "0.17.15", + "@esbuild/linux-ia32": "0.17.15", + "@esbuild/linux-loong64": "0.17.15", + "@esbuild/linux-mips64el": "0.17.15", + "@esbuild/linux-ppc64": "0.17.15", + "@esbuild/linux-riscv64": "0.17.15", + "@esbuild/linux-s390x": "0.17.15", + "@esbuild/linux-x64": "0.17.15", + "@esbuild/netbsd-x64": "0.17.15", + "@esbuild/openbsd-x64": "0.17.15", + "@esbuild/sunos-x64": "0.17.15", + "@esbuild/win32-arm64": "0.17.15", + "@esbuild/win32-ia32": "0.17.15", + "@esbuild/win32-x64": "0.17.15" + } + }, + "follow-redirects": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "dev": true + }, + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "optional": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "is-core-module": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "laravel-vite-plugin": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/laravel-vite-plugin/-/laravel-vite-plugin-0.7.4.tgz", + "integrity": "sha512-NlIuXbeuI+4NZzRpWNpGHRVTwuFWessvD7QoD+o2MlyAi7qyUS4J8r4/yTlu1dl9lxcR7iKoYUmHQqZDcrw2KA==", + "dev": true, + "requires": { + "picocolors": "^1.0.0", + "vite-plugin-full-reload": "^1.0.5" + } + }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "requires": { + "mime-db": "1.52.0" + } + }, + "nanoid": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", + "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", + "dev": true + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true + }, + "postcss": { + "version": "8.4.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz", + "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==", + "dev": true, + "requires": { + "nanoid": "^3.3.4", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + } + }, + "promise-polyfill": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/promise-polyfill/-/promise-polyfill-6.1.0.tgz", + "integrity": "sha512-g0LWaH0gFsxovsU7R5LrrhHhWAWiHRnh1GPrhXnPgYsDkIqjRYUYSZEsej/wtleDrz5xVSIDbeKfidztp2XHFQ==" + }, + "proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "dev": true + }, + "resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "dev": true, + "requires": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, + "rollup": { + "version": "3.20.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.20.2.tgz", + "integrity": "sha512-3zwkBQl7Ai7MFYQE0y1MeQ15+9jsi7XxfrqwTb/9EK8D9C9+//EBR4M+CuA1KODRaNbFez/lWxA5vhEGZp4MUg==", + "dev": true, + "requires": { + "fsevents": "~2.3.2" + } + }, + "source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "dev": true + }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true + }, + "sweetalert": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/sweetalert/-/sweetalert-2.1.2.tgz", + "integrity": "sha512-iWx7X4anRBNDa/a+AdTmvAzQtkN1+s4j/JJRWlHpYE8Qimkohs8/XnFcWeYHH2lMA8LRCa5tj2d244If3S/hzA==", + "requires": { + "es6-object-assign": "^1.1.0", + "promise-polyfill": "^6.0.2" + } + }, + "vite": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.2.1.tgz", + "integrity": "sha512-7MKhqdy0ISo4wnvwtqZkjke6XN4taqQ2TBaTccLIpOKv7Vp2h4Y+NpmWCnGDeSvvn45KxvWgGyb0MkHvY1vgbg==", + "dev": true, + "requires": { + "esbuild": "^0.17.5", + "fsevents": "~2.3.2", + "postcss": "^8.4.21", + "resolve": "^1.22.1", + "rollup": "^3.18.0" + } + }, + "vite-plugin-full-reload": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/vite-plugin-full-reload/-/vite-plugin-full-reload-1.0.5.tgz", + "integrity": "sha512-kVZFDFWr0DxiHn6MuDVTQf7gnWIdETGlZh0hvTiMXzRN80vgF4PKbONSq8U1d0WtHsKaFODTQgJeakLacoPZEQ==", + "dev": true, + "requires": { + "picocolors": "^1.0.0", + "picomatch": "^2.3.1" + } + } + } +} diff --git a/backup/package.json b/backup/package.json new file mode 100644 index 0000000..21908ce --- /dev/null +++ b/backup/package.json @@ -0,0 +1,15 @@ +{ + "private": true, + "scripts": { + "dev": "vite", + "build": "vite build" + }, + "devDependencies": { + "axios": "^1.1.2", + "laravel-vite-plugin": "^0.7.2", + "vite": "^4.0.0" + }, + "dependencies": { + "sweetalert": "^2.1.2" + } +} diff --git a/backup/phpunit.xml b/backup/phpunit.xml new file mode 100644 index 0000000..eb13aff --- /dev/null +++ b/backup/phpunit.xml @@ -0,0 +1,31 @@ + + + + + ./tests/Unit + + + ./tests/Feature + + + + + ./app + + + + + + + + + + + + + + diff --git a/backup/public/.htaccess b/backup/public/.htaccess new file mode 100644 index 0000000..3aec5e2 --- /dev/null +++ b/backup/public/.htaccess @@ -0,0 +1,21 @@ + + + Options -MultiViews -Indexes + + + RewriteEngine On + + # Handle Authorization Header + RewriteCond %{HTTP:Authorization} . + RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] + + # Redirect Trailing Slashes If Not A Folder... + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_URI} (.+)/$ + RewriteRule ^ %1 [L,R=301] + + # Send Requests To Front Controller... + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^ index.php [L] + diff --git a/backup/public/1adminer.php b/backup/public/1adminer.php new file mode 100644 index 0000000..762aaaf --- /dev/null +++ b/backup/public/1adminer.php @@ -0,0 +1,1795 @@ +$W){unset($tg[$z][$he]);if(is_array($W)){$tg[$z][stripslashes($he)]=$W;$tg[]=&$tg[$z][stripslashes($he)];}else$tg[$z][stripslashes($he)]=($ad?$W:stripslashes($W));}}}}function +bracket_escape($v,$Na=false){static$ui=array(':'=>':1',']'=>':2','['=>':3','"'=>':4');return +strtr($v,($Na?array_flip($ui):$ui));}function +min_version($Zi,$De="",$h=null){global$g;if(!$h)$h=$g;$nh=$h->server_info;if($De&&preg_match('~([\d.]+)-MariaDB~',$nh,$C)){$nh=$C[1];$Zi=$De;}return(version_compare($nh,$Zi)>=0);}function +charset($g){return(min_version("5.5.3",0,$g)?"utf8mb4":"utf8");}function +script($yh,$ti="\n"){return"$yh$ti";}function +script_src($Ni){return"\n";}function +nonce(){return' nonce="'.get_nonce().'"';}function +target_blank(){return' target="_blank" rel="noreferrer noopener"';}function +h($P){return +str_replace("\0","�",htmlspecialchars($P,ENT_QUOTES,'utf-8'));}function +nl_br($P){return +str_replace("\n","
",$P);}function +checkbox($D,$Y,$db,$me="",$uf="",$hb="",$ne=""){$I="".($uf?script("qsl('input').onclick = function () { $uf };",""):"");return($me!=""||$hb?"$I".h($me)."":$I);}function +optionlist($_f,$gh=null,$Ri=false){$I="";foreach($_f +as$he=>$W){$Af=array($he=>$W);if(is_array($W)){$I.='';$Af=$W;}foreach($Af +as$z=>$X)$I.=''.h($X);if(is_array($W))$I.='';}return$I;}function +html_select($D,$_f,$Y="",$tf=true,$ne=""){if($tf)return"".(is_string($tf)?script("qsl('select').onchange = function () { $tf };",""):"");$I="";foreach($_f +as$z=>$X)$I.="";return$I;}function +select_input($Ia,$_f,$Y="",$tf="",$fg=""){$Yh=($_f?"select":"input");return"<$Yh$Ia".($_f?">