Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
app
/
Providers
:
JetstreamServiceProvider.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php // this Code is Cracked by dharunMods-YouTube-Channel namespace App\Providers; use App\Actions\Jetstream\DeleteUser; use Illuminate\Support\ServiceProvider; use Laravel\Jetstream\Jetstream; use App\Models\User; use Illuminate\Http\Request; use Illuminate\Support\Facades\Hash; use Laravel\Fortify\Fortify; use Illuminate\Support\Facades\DB; use App\Models\Settings; use Jenssegers\Agent\Agent; class JetstreamServiceProvider extends ServiceProvider { /** * Register any application services. * * @return void */ public function register() { // } /** * Bootstrap any application services. * * @return void */ public function boot() { $this->configurePermissions(); Jetstream::deleteUsersUsing(DeleteUser::class); Fortify::loginView(function () { return view('auth.login', [ 'title' => 'Sign In to Continue', 'settings' => Settings::where('id', '1')->first(), ]); }); Fortify::authenticateUsing(function (Request $request) { $user = User::where('email', $request->email)->first(); $agent = new Agent(); if ( $user && Hash::check($request->password, $user->password) ) { $request->session()->put('getAnouc', 'true'); DB::table('activities')->insert([ 'user' => $user->id, 'ip_address' => $request->ip(), 'device' => $agent->device(), 'browser' => $agent->browser(), 'os' => $agent->platform(), ]); return $user; } }); Fortify::registerView(function () { return view('auth.register', [ 'title' => 'Register an Account', 'settings' => Settings::where('id', '1')->first(), ]); }); } /** * Configure the permissions that are available within the application. * * @return void */ protected function configurePermissions() { Jetstream::defaultApiTokenPermissions(['read']); Jetstream::permissions([ 'create', 'read', 'update', 'delete', ]); } }