Changeset 0a1fb54
- Timestamp:
- 11/23/21 22:01:52 (3 years ago)
- Branches:
- master
- Children:
- dbc5976
- Parents:
- 4d73966
- Files:
-
- 5 added
- 31 edited
Legend:
- Unmodified
- Added
- Removed
-
app/Http/Controllers/Auth/CreatePasswordController.php
r4d73966 r0a1fb54 36 36 $user->save(); 37 37 38 return redirect()->route("auth. loginShow");38 return redirect()->route("auth.showLogin"); 39 39 } 40 40 } -
app/Http/Controllers/Auth/VerifyLoginController.php
r4d73966 r0a1fb54 6 6 use App\Http\Controllers\Controller; 7 7 use App\Models\User; 8 use App\Notifications\VerifyUser; 8 9 use Illuminate\Http\Request; 9 10 use App\Services\Hashid; 11 use Illuminate\Support\Carbon; 10 12 11 13 class VerifyLoginController extends Controller -
app/Http/Controllers/Dashboard/DepartmentsController.php
r4d73966 r0a1fb54 27 27 } 28 28 29 public function create()30 {31 return view("dashboard.departments.create");32 }33 34 29 public function store(NewDepartmentRequest $request) 35 30 { … … 48 43 $department->user_id = auth()->id(); 49 44 50 $users = User::all();51 52 45 $department->save(); 53 46 … … 55 48 56 49 return redirect()->route("dashboard.departments.index"); 57 }58 59 public function editShow($id)60 {61 return view("dashboard.departments.edit")->with([62 "department" => Department::findOrFail($id)63 ]);64 50 } 65 51 … … 79 65 $location = 'Departments' . DIRECTORY_SEPARATOR . $request->code; 80 66 81 if(!Storage::disk('local')->has($location) && Folder::where('department_id', $department->id)->pluck('no_of_files')->first() > 0){67 if(!Storage::disk('local')->has($location) ){ 82 68 Storage::disk('local')->move($oldLocation, $location); 83 69 $department->location = $location; … … 88 74 $folder->arch_id = $department->code . '/' . $currArchId; 89 75 $folder->save(); 76 90 77 foreach($folder->files as $file) { 78 //dd($file); 91 79 $file->location = $location . DIRECTORY_SEPARATOR . $folder->name . DIRECTORY_SEPARATOR . $file->name; 92 80 $file->save(); -
app/Http/Controllers/Dashboard/FilesController.php
r4d73966 r0a1fb54 57 57 58 58 if(File::where(['folder_id' => $folder->id, 'name' => $fileName])->count() > 0) { 59 59 60 Alert::flash("The uploaded file already exists", "error"); 60 61 61 return redirect()->back(); 62 62 } -
app/Http/Controllers/Dashboard/FoldersController.php
r4d73966 r0a1fb54 36 36 37 37 if ($request->query('sort') == 'newest') { 38 $folders = $foldersInDeptSort->orderBy('created_at', 'desc')->paginate( 12);38 $folders = $foldersInDeptSort->orderBy('created_at', 'desc')->paginate(9); 39 39 } 40 40 else if ($request->query('sort') == 'name') { 41 $folders = $foldersInDeptSort->orderBy('name', 'asc')->paginate( 12);41 $folders = $foldersInDeptSort->orderBy('name', 'asc')->paginate(9); 42 42 } 43 43 else if ($request->query('sort') == 'no_of_files') { 44 $folders = $foldersInDeptSort->orderBy('no_of_files', 'desc')->paginate( 12);44 $folders = $foldersInDeptSort->orderBy('no_of_files', 'desc')->paginate(9); 45 45 } 46 46 else if($request->query('sort') == 'count'){ 47 47 $total = $foldersInDeptSort->folder->files->count(); 48 $folders = $foldersInDeptSort->orderBy($total, 'asc')->paginate( 12);48 $folders = $foldersInDeptSort->orderBy($total, 'asc')->paginate(9); 49 49 } 50 50 else { 51 $folders = Folder::where('department_id', $request->query('id'))->paginate( 12);51 $folders = Folder::where('department_id', $request->query('id'))->paginate(9); 52 52 } 53 53 } else { 54 54 if ($request->query('sort') == 'newest') { 55 $folders = Folder::orderBy('created_at', 'desc')->paginate( 12);55 $folders = Folder::orderBy('created_at', 'desc')->paginate(9); 56 56 } 57 57 else if ($request->query('sort') == 'name') { 58 $folders = Folder::orderBy('name', 'asc')->paginate( 12);58 $folders = Folder::orderBy('name', 'asc')->paginate(9); 59 59 } 60 60 else if ($request->query('sort') == 'no_of_files') { 61 $folders = Folder::orderBy('no_of_files', 'desc')->paginate( 12);61 $folders = Folder::orderBy('no_of_files', 'desc')->paginate(9); 62 62 } 63 63 else if ($request->query('sort') == 'recent') { 64 $folders = Folder::orderBy('created_at', 'desc')->paginate( 12);64 $folders = Folder::orderBy('created_at', 'desc')->paginate(9); 65 65 } else if ($request->query('search')) { 66 66 … … 73 73 $folders = $result; 74 74 } else { 75 $folders = Folder::paginate( 12);75 $folders = Folder::paginate(9); 76 76 } 77 77 } -
app/Http/Controllers/Dashboard/IndexController.php
r4d73966 r0a1fb54 32 32 return view("dashboard.index")->with([ 33 33 "counters" => $counters, 34 "largestDepartments" => Department::orderBy('no_of_folders', 'desc')->limit( 10)->get(),34 "largestDepartments" => Department::orderBy('no_of_folders', 'desc')->limit(5)->get(), 35 35 "folders" => Folder::all(), 36 36 "files" => File::all(), -
app/Http/Controllers/Dashboard/SettingsController.php
r4d73966 r0a1fb54 21 21 public function settings() 22 22 { 23 $fileType = FileType::find("1");24 25 23 return view("dashboard.settings.index")->with([ 26 24 "user" => auth()->user(), 27 "adminAndReferents" => User::where("role_id", 1)->orWhere("role_id", 2)->get(),28 25 "active_tab" => "account", 29 "fileType" => $fileType26 "fileType" => FileType::find("1") 30 27 ]); 31 28 } … … 38 35 $user->save(); 39 36 37 Alert::flash("Username updated successfully"); 38 40 39 auth()->logout(); 41 40 session()->flush(); 42 41 43 return redirect()->route("auth. loginShow");42 return redirect()->route("auth.showLogin"); 44 43 } 45 44 … … 51 50 $user->save(); 52 51 52 Alert::flash("Password updated successfully"); 53 53 54 auth()->logout(); 54 55 session()->flush(); 55 56 56 return redirect()->route("auth. loginShow");57 return redirect()->route("auth.showLogin"); 57 58 } 58 59 … … 71 72 $user->notify(new VerifyNewEmail($user)); 72 73 74 Alert::flash("Email updated successfully"); 75 73 76 auth()->logout(); 74 77 session()->flush(); 75 78 76 return redirect()->route("auth. loginShow");79 return redirect()->route("auth.showLogin"); 77 80 } 78 81 -
app/Http/Controllers/Dashboard/UsersController.php
r4d73966 r0a1fb54 27 27 return view("dashboard.users.index")->with([ 28 28 "users" => User::all(), 29 "roles" => Role::all(), 30 "adminAndReferents" => User::where("role_id", 1)->orWhere("role_id", 2)->get() 31 ]); 32 } 33 34 public function create() 35 { 36 return view("dashboard.users.create")->with([ 37 "roles" => Role::all(), 29 "roles" => Role::all() 38 30 ]); 39 31 } … … 77 69 } 78 70 79 public function editShow($id)80 {81 return view("dashboard.users.edit")->with([82 "user" => User::findOrFail($id),83 "roles" => Role::all(),84 ]);85 }86 87 71 public function edit(UpdateUserRequest $request, $id) 88 72 { … … 110 94 111 95 if($user->isDirty('email')) { 96 $user->is_active = false; 97 $user->security_code = $user->generateSecurityCode(); 98 $user->verify_token = $user->generateVerifyToken(); 112 99 $user->notify(new VerifyNewEmail($user)); 113 100 } 101 114 102 $user->save(); 115 103 -
app/Http/Middleware/Authenticate.php
r4d73966 r0a1fb54 16 16 { 17 17 if (! $request->expectsJson()) { 18 return route('auth. loginShow');18 return route('auth.showLogin'); 19 19 } 20 20 } -
app/Http/Middleware/CheckCreatePassword.php
r4d73966 r0a1fb54 24 24 25 25 if($user->is_active) { 26 return redirect()->route("auth. loginShow");26 return redirect()->route("auth.showLogin"); 27 27 } 28 28 29 29 if(!$user->is_forgot_password) { 30 if(Carbon::now()->greaterThan($user->created_at->addMinutes(1 0))) {31 return redirect()->route("auth. loginShow");30 if(Carbon::now()->greaterThan($user->created_at->addMinutes(180))) { 31 return redirect()->route("auth.showLogin"); 32 32 } 33 33 } -
app/Http/Middleware/CheckIsActive.php
r4d73966 r0a1fb54 24 24 auth()->logout(); 25 25 26 return redirect()->route("auth. loginShow");26 return redirect()->route("auth.showLogin"); 27 27 } 28 28 -
app/Http/Middleware/CheckVerifyNewEmail.php
r4d73966 r0a1fb54 23 23 24 24 if($user->is_active) { 25 return redirect()->route("auth. loginShow");25 return redirect()->route("auth.showLogin"); 26 26 } 27 27 -
app/Http/Middleware/CheckVerifyToken.php
r4d73966 r0a1fb54 6 6 use App\Services\Hashid; 7 7 use Closure; 8 use Illuminate\Support\Carbon; 8 9 9 10 class CheckVerifyToken … … 23 24 $user = User::findOrFail($hashId->decode($id)); 24 25 25 if ($user->verify_token !== $token || now()->greaterThan($user->updated_at->addMinutes(1))) {26 if ($user->verify_token !== $token || Carbon::now()->greaterThan($user->updated_at->addMinutes(1))) { 26 27 return redirect()->route("auth.login"); 27 28 } -
app/Models/Department.php
r4d73966 r0a1fb54 9 9 class Department extends Model 10 10 { 11 use Notifiable;12 11 use HasFactory; 13 12 … … 20 19 ]; 21 20 22 public function getCreatedByName()23 {24 return User::where('id', $this->user_id)->pluck('username')->first();25 }26 27 21 public function folder(){ 28 22 return $this->hasMany(Folder::class); 29 23 } 30 24 31 // public function getDeptId(){ 32 // return Department::where('id', $this->id)->get(); 33 // } 25 public function user(){ 26 return $this->belongsTo(User::class); 27 } 28 34 29 } -
app/Models/File.php
r4d73966 r0a1fb54 12 12 13 13 protected $table = "files"; 14 protected $fillable = ["name", "location", " document_id"];14 protected $fillable = ["name", "location", "folder_id"]; 15 15 16 16 public function folder() … … 21 21 public function getSize($location) 22 22 { 23 $fileSize = Storage::disk(' uploads')->size($location) / 1024 / 1024;23 $fileSize = Storage::disk('local')->size($location) / 1024 / 1024; 24 24 $fileSize = round($fileSize, 2); 25 25 return $fileSize; -
app/Models/User.php
r4d73966 r0a1fb54 134 134 } 135 135 136 public function getCreatedByUsername() 137 { 138 return User::where('id', $this->created_by)->pluck('username')->first(); 139 } 140 136 141 public function getCreatedByName() 137 142 { 138 return User::where('id', $this->created_by)->pluck('username')->first(); 143 $name = User::where('id', $this->created_by)->pluck('name')->first(); 144 $surname = User::where('id', $this->created_by)->pluck('surname')->first(); 145 146 return $name . " " . $surname; 139 147 } 140 148 … … 142 150 return $this->hasMany(Folder::class); 143 151 } 152 153 public function department() { 154 return $this->hasMany(Department::class); 155 } 144 156 } -
app/Notifications/VerifyUser.php
r4d73966 r0a1fb54 70 70 ]; 71 71 } 72 73 74 72 } -
app/Notifications/WelcomeUser.php
r4d73966 r0a1fb54 49 49 ->line("Security Code: " . $this->user->security_code) 50 50 ->line("To create password for your account just click the button then create something good. :))") 51 ->line("NOTE: You have only 10 minutes to create your password.")51 ->line("NOTE: You have only 3 hours to create your password.") 52 52 ->action("Create Password", url("/auth/create-password/" . $this->user->id . "/" . $this->user->verify_token)); 53 53 } -
config/filesystems.php
r4d73966 r0a1fb54 60 60 'uploads' => [ 61 61 'driver' => 'local', 62 'root' => storage_path() . DIRECTORY_SEPARATOR . 'app',62 'root' => public_path() . DIRECTORY_SEPARATOR . 'uploads' . DIRECTORY_SEPARATOR, 63 63 ], 64 64 -
database/factories/DepartmentFactory.php
r4d73966 r0a1fb54 28 28 { 29 29 $location = $this->faker->unique()->numberBetween(1, 10); 30 Storage::disk(' uploads')->makeDirectory('Departments/' . $location);30 Storage::disk('local')->makeDirectory('Departments/' . $location); 31 31 return [ 32 32 'name' => "Department" . ' ' . $this->faker->unique()->firstName(), -
database/factories/FolderFactory.php
r4d73966 r0a1fb54 27 27 public function definition() 28 28 { 29 $inputArray = [5, 15, 25, 35, 45, 55, 65, 75, 85, 95];30 $deptId = Arr::random($inputArray);29 //$inputArray = [5, 15, 25, 35, 45, 55, 65, 75, 85, 95]; 30 //$deptId = Arr::random($inputArray); 31 31 32 //$deptId = $this->faker->numberBetween(1, 10);32 $deptId = $this->faker->numberBetween(1, 10); 33 33 34 34 $deptCode = Department::find($deptId)->code; … … 37 37 38 38 $location = 'Departments' . DIRECTORY_SEPARATOR . $deptCode . DIRECTORY_SEPARATOR . $name; 39 Storage::disk(' uploads')->makeDirectory($location);39 Storage::disk('local')->makeDirectory($location); 40 40 41 41 return [ -
database/seeders/UsersTableSeeder.php
r4d73966 r0a1fb54 61 61 ]); 62 62 63 User::factory()->count(50)->create();63 //User::factory()->count(50)->create(); 64 64 65 65 } -
resources/views/auth/forgot.blade.php
r4d73966 r0a1fb54 23 23 <hr> 24 24 <p class="text-muted">I remember my password</p> 25 <a href="{{ route("auth. loginShow") }}" class="btn btn-sm btn-outline-light ml-1">Login</a>25 <a href="{{ route("auth.showLogin") }}" class="btn btn-sm btn-outline-light ml-1">Login</a> 26 26 </form> 27 27 <!-- ./ form --> -
resources/views/auth/verify-login.blade.php
r4d73966 r0a1fb54 24 24 25 25 </form> 26 27 26 @endsection -
resources/views/dashboard/departments/index.blade.php
r4d73966 r0a1fb54 52 52 <th>Folders</th> 53 53 <th>Created by</th> 54 <th>Created at</th>55 54 <th>Updated at</th> 56 55 <th>Directory</th> … … 66 65 <td>{{ $department->code }}</td> 67 66 <td>{{ $department->no_of_folders }}</td> 68 <td>{{ $department->getCreatedByName() }}</td> 69 <td>{{ date('d.m.Y - H:i', strtotime($department->created_at)) }}</td> 67 <td>{{ $department->user->username }} 68 <div class="font-weight-light p-1">{{$department->user->name}} {{$department->user->surname}}</div> 69 <div class="font-weight-light p-1">{{ date('d.m.Y - H:i', strtotime($department->created_at)) }}</div> 70 </td> 71 70 72 @if($department->updated_at==NULL) 71 73 <td>/</td> 72 74 @else 73 <td>{{ date('d.m.Y - H:i', strtotime($department->updated_at)) }}</td>75 <td class="font-weight-light p-1">{{ date('d.m.Y - H:i', strtotime($department->updated_at)) }}</td> 74 76 @endif 77 75 78 <!-- Trigger --> 76 79 <td><button data-clipboard-text="{{$department->location}}" class="btn btn-sm btn-primary text-white" data-toggle="tooltip" data-placement="right" title="{{$department->location}}"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard" viewBox="0 0 16 16"> -
resources/views/dashboard/folders/files.blade.php
r4d73966 r0a1fb54 70 70 71 71 <p>Files in {{$folder->name}}</p> 72 72 {{-- @dd($files)--}} 73 73 <div class="row"> 74 74 @forelse($files as $file) 75 75 76 <div class="col-xl-3 col-lg-4 col-md-6 col-sm-12"> 76 77 <div class="card app-file-list"> … … 162 163 <div class="modal-content"> 163 164 <div class="modal-header"> 164 <h5 class="modal-title" id="exampleModalCenterTitle">Upload </h5>165 <h5 class="modal-title" id="exampleModalCenterTitle">Upload files to {{$folder->name}}</h5> 165 166 <button type="button" class="close" data-dismiss="modal" aria-label="Close"> 166 167 <i class="ti-close"></i> -
resources/views/dashboard/folders/index.blade.php
r4d73966 r0a1fb54 83 83 <a class="dropdown-item" href="javascript:void(0)" data-toggle="modal" data-target="#createModal">Add folder</a> 84 84 @endif 85 @if(auth()->user()->hasPermission('export_data') )85 @if(auth()->user()->hasPermission('export_data') && Request::query('id')==null) 86 86 <a href="{{ route('dashboard.folders.export') }}" class="dropdown-item text-success">Export</a> 87 87 </div> … … 171 171 <p class="badge bg-success-bright text-success">Version: {{$folder->version}}</p> 172 172 <p>Archive ID: {{$folder->arch_id}}</p> 173 <p>Department: {{$folder->department->name}}</p> 173 174 <p>Note: {{$folder->note}}</p> 174 175 <div class="row"> -
resources/views/dashboard/index.blade.php
r4d73966 r0a1fb54 119 119 <th>Name</th> 120 120 <th>Created at</th> 121 <th>Updated at</th>122 121 <th>Folder name</th> 123 122 <th>Folder archive ID</th> … … 165 164 <td>{{ $file->name }}</td> 166 165 <td>{{ date('d.m.Y - H:i', strtotime($file->created_at)) }}</td> 167 @if($file->updated_at==NULL)168 <td>/</td>169 @else170 <td>{{ date('d.m.Y - H:i', strtotime($file->updated_at)) }}</td>171 @endif172 166 <td><a href="{{ route('dashboard.folders.files', ['id' => $file->folder_id]) }}" class="text-linkedin">{{ \App\Models\Folder::find($file->folder_id)->name }}</a></td> 173 167 <td>{{ \App\Models\Folder::find($file->folder_id)->arch_id }}</td> … … 180 174 @if(auth()->user()->hasPermission('manage_all_files')) 181 175 <td> 182 <a href="javascript:void(0)" class="text-secondary" data-toggle="modal" data-target="#editModal_{{$file->id}}" title="Edit">183 <i class="ti-pencil"></i>184 </a>185 176 <a href="{{ route("dashboard.files.downloadFile", ['id' => $file->id]) }}" class="text-danger ml-2"title="Download"> 186 177 <i class="ti-download"></i> … … 244 235 <div class="d-flex justify-content-between align-items-start mb-3"> 245 236 <h6 class="card-title mb-0">Largest departments</h6> 246 <a href="{{route("dashboard.departments.index")}}" class="small text-linkedin">View </a>237 <a href="{{route("dashboard.departments.index")}}" class="small text-linkedin">View all</a> 247 238 </div> 248 239 </div> … … 260 251 261 252 <td> 262 <a href="{{ route("dashboard.folders.index", ['id' => $department->id]) }}" >{{$department->name}}</a>253 <a href="{{ route("dashboard.folders.index", ['id' => $department->id]) }}" class="text-linkedin">{{$department->name}}</a> 263 254 </td> 264 255 <td> -
resources/views/dashboard/settings/index.blade.php
r4d73966 r0a1fb54 70 70 <div class="col-md-1"> 71 71 <div class="form-group"> 72 <label> Current</label>72 <label></label> 73 73 <figure class="avatar avatar-sm mr-2"> 74 74 @if(auth()->user()->avatar==NULL) -
resources/views/dashboard/users/index.blade.php
r4d73966 r0a1fb54 45 45 <th>Name</th> 46 46 <th>Created by</th> 47 <th>Created at</th>48 47 <th>Updated at</th> 49 48 <th>Status</th> … … 81 80 <div class="font-weight-light p-1">{{$user->phone_number}}</div> 82 81 </td> 83 <td>{{ $user->getCreatedByName() }}</td> 84 <td>{{ date('d.m.Y - H:i', strtotime($user->created_at)) }}</td> 82 <td>{{ $user->getCreatedByUsername() }} 83 <div class="font-weight-light p-1">{{$user->getCreatedByName()}}</div> 84 <div class="font-weight-light p-1">{{ date('d.m.Y - H:i', strtotime($user->created_at)) }}</div> 85 </td> 86 85 87 @if($user->updated_at==NULL) 86 88 <td>/</td> … … 88 90 <td>{{ date('d.m.Y - H:i', strtotime($user->updated_at)) }}</td> 89 91 @endif 92 90 93 <td> 91 94 @if(Cache::has('is_online' . $user->id)) … … 99 102 @endif 100 103 </td> 101 @if(auth()->user()->hasPermission('manage_all_users') )104 @if(auth()->user()->hasPermission('manage_all_users') && auth()->user()->id != $user->id) 102 105 @if($user->hasRole("Referent") || $user->hasRole("Viewer") && $user->is_confirmed) 103 106 <td> … … 105 108 <i class="ti-pencil"></i> 106 109 </a> 110 @if ($user->is_active) 111 <a href="javascript:void(0)" data-toggle="modal" data-target="#blockModal_{{$user->id}}" class="text-warning ml-2" title="Block"> 112 <i class="ti-lock"></i> 113 </a> 114 @else 115 <a href="javascript:void(0)" data-toggle="modal" data-target="#unBlockModal_{{$user->id}}" class="text-warning ml-2" title="Unblock"> 116 <i class="ti-unlock"></i> 117 </a> 118 @endif 107 119 <a href="javascript:void(0)" class="text-danger ml-2" data-toggle="modal" data-target="#deleteModal_{{$user->id}}" title="Delete"> 108 120 <i class="ti-trash"></i> 109 121 </a> 122 110 123 </td> 111 124 @else … … 186 199 <div class="col-md-1"> 187 200 <div class="form-group"> 188 <label> Current</label>201 <label></label> 189 202 <figure class="avatar avatar-sm mr-2"> 190 203 @if($user->avatar==NULL) … … 223 236 @method('DELETE') 224 237 <p>Are you sure you want to delete user {{$user->username}} ?</p> 238 <p>Number of folders created: <a href="{{ route("dashboard.folders.index", ['id' => $user->id]) }}" class="text-linkedin">{{\App\Models\Folder::where('user_id', $user->id)->count()}}</a></p> 239 <div class="modal-footer"> 240 <button type="button" class="btn btn-secondary" data-dismiss="modal">Close 241 </button> 242 <button type="submit" class="btn btn-primary">Save changes</button> 243 </div> 244 </form> 245 </div> 246 247 </div> 248 </div> 249 </div> 250 251 <div class="modal fade" id="blockModal_{{$user->id}}" tabindex="-1" role="dialog" aria-hidden="true"> 252 <div class="modal-dialog modal-dialog-centered" role="document"> 253 <div class="modal-content"> 254 <div class="modal-header"> 255 <h5 class="modal-title" id="exampleModalCenterTitle">Block confirmation</h5> 256 <button type="button" class="close" data-dismiss="modal" aria-label="Close"> 257 <i class="ti-close"></i> 258 </button> 259 </div> 260 <div class="modal-body"> 261 <form action="{{ route("dashboard.users.block", $user->id) }}" method="POST"> 262 @csrf 263 @method('patch') 264 <p>Are you sure you want to block user {{$user->username}} ?</p> 265 <p>Number of folders created: <a href="{{ route("dashboard.folders.index", ['id' => $user->id]) }}" class="text-linkedin">{{\App\Models\Folder::where('user_id', $user->id)->count()}}</a></p> 266 <div class="modal-footer"> 267 <button type="button" class="btn btn-secondary" data-dismiss="modal">Close 268 </button> 269 <button type="submit" class="btn btn-primary">Save changes</button> 270 </div> 271 </form> 272 </div> 273 274 </div> 275 </div> 276 </div> 277 278 279 <div class="modal fade" id="unBlockModal_{{$user->id}}" tabindex="-1" role="dialog" aria-hidden="true"> 280 <div class="modal-dialog modal-dialog-centered" role="document"> 281 <div class="modal-content"> 282 <div class="modal-header"> 283 <h5 class="modal-title" id="exampleModalCenterTitle">Unblock confirmation</h5> 284 <button type="button" class="close" data-dismiss="modal" aria-label="Close"> 285 <i class="ti-close"></i> 286 </button> 287 </div> 288 <div class="modal-body"> 289 <form action="{{ route("dashboard.users.unblock", $user->id) }}" method="POST"> 290 @csrf 291 @method('patch') 292 <p>Are you sure you want to block user {{$user->username}} ?</p> 225 293 <p>Number of folders created: <a href="{{ route("dashboard.folders.index", ['id' => $user->id]) }}" class="text-linkedin">{{\App\Models\Folder::where('user_id', $user->id)->count()}}</a></p> 226 294 <div class="modal-footer"> -
routes/web.php
r4d73966 r0a1fb54 27 27 Route::group(['prefix' => 'auth'], function () { 28 28 29 Route::get('/login', "Auth\LoginController@showLogin")->name("auth. loginShow");29 Route::get('/login', "Auth\LoginController@showLogin")->name("auth.showLogin"); 30 30 Route::get('/verify-login/{id}/{token}', "Auth\VerifyLoginController@index")->middleware("CheckVerifyToken")->name("verify-login.index"); 31 31 Route::post('/verify-login/{id}/{token}', "Auth\VerifyLoginController@verify")->name("verify-login"); … … 41 41 }); 42 42 43 Route::group(['middleware' => "checkVerifyNewEmail"], function () { 44 Route::get('/verify/{id}/{token}', "Auth\VerifyNewEmailController@create")->name("auth.verifyShow"); 45 Route::post('/verify/{id}/{token}', "Auth\VerifyNewEmailController@verify")->name("auth.verify"); 46 }); 43 47 }); 44 48 … … 84 88 // Departments manage 85 89 Route::group(['middleware' => 'permission:manage_all_departments'], function () { 86 Route::get("/departments/create", "Dashboard\DepartmentsController@create")->name("dashboard.departments.create"); 87 Route::post("/departments/store", "Dashboard\DepartmentsController@store")->name("dashboard.departments.store"); 88 Route::get("/departments/{id}/edit", "Dashboard\DepartmentsController@editShow")->name("dashboard.departments.editShow"); 89 Route::patch("/departments/{id}/edit", "Dashboard\DepartmentsController@edit")->name("dashboard.departments.edit"); 90 Route::post("/departments/store", "Dashboard\DepartmentsController@store")->name("dashboard.departments.store"); 91 Route::patch("/departments/{id}/edit", "Dashboard\DepartmentsController@edit")->name("dashboard.departments.edit"); 90 92 }); 91 93
Note:
See TracChangeset
for help on using the changeset viewer.