diff --git a/app/Actions/UpdateBrokerAction.php b/app/Actions/UpdateBrokerAction.php new file mode 100644 index 0000000..275bf21 --- /dev/null +++ b/app/Actions/UpdateBrokerAction.php @@ -0,0 +1,30 @@ +only($userFields)->toArray(); + $userData = $data->except($userFields)->toArray(); + + DB::transaction(function () use ($profileData, $profile, $userData) { + $profile->update($profileData); + $user = $profile->type; + $user->update($userData); + }); + } +} diff --git a/app/Http/Controllers/Admin/BrokerController.php b/app/Http/Controllers/Admin/BrokerController.php new file mode 100644 index 0000000..a086210 --- /dev/null +++ b/app/Http/Controllers/Admin/BrokerController.php @@ -0,0 +1,79 @@ +with('activeBrokers', Broker::select(['id', 'location']) + ->whereRelation('user', 'status', UserStatus::Active->value) + ->with('user:id,name,email,role_id,role_type') + ->get() + ) + ->with('pendingBrokers', Broker::select(['id', 'location']) + ->whereRelation('user', 'status', UserStatus::Pending->value) + ->with('user:id,name,email,role_id,role_type') + ->get() + ); + } + + public function edit(Broker $broker) + { + return view('dashboards.admin.brokers.edit') + ->with('profile', $broker->user) + ->with('backLink', route('admin.brokers.index')) + ->with('actionLink', route('admin.brokers.update', $broker)); + } + + public function update(StoreBrokerProfileRequest $request, Broker $broker, UpdateBrokerAction $action) + { + try { + $action->execute($request->validated(), $broker->user); + + return to_route('admin.brokers.index') + ->with('success', 'Profile updated successfully.'); + } catch (\Throwable $e) { + Log::error('Broker Profile Update Failed: ', [$e->getMessage(), $e->getTrace()]); + + return back()->withInput()->with('error', 'Something went wrong.'); + } + } + + public function destroy(Broker $broker) + { + try { + \DB::transaction(function () use ($broker) { + $broker->user->delete(); + $broker->delete(); + }); + + return back()->with('success', 'Broker deleted successfully.'); + } catch (\Throwable $e) { + Log::error('Broker Delete Failed: ', [$e->getMessage(), $e->getTrace()]); + + return back()->with('error', 'Something went wrong.'); + } + } + + public function approve(Broker $broker) + { + try { + $broker->user->update(['status' => UserStatus::Active->value]); + + return to_route('admin.brokers.index')->with('success', 'Broker approved successfully.'); + } catch (\Throwable $e) { + Log::error('Broker Approval Failed: ', [$e->getMessage(), $e->getTrace()]); + + return back()->with('error', 'Something went wrong.'); + } + } +} diff --git a/app/Http/Controllers/Admin/CustomerController.php b/app/Http/Controllers/Admin/CustomerController.php index e509116..ce065dd 100644 --- a/app/Http/Controllers/Admin/CustomerController.php +++ b/app/Http/Controllers/Admin/CustomerController.php @@ -35,7 +35,7 @@ public function update(StoreCustomerProfileRequest $request, Customer $customer, return to_route('admin.customers.index') ->with('success', 'Profile updated successfully.'); } catch (\Throwable $e) { - Log::error('Customer Profile Update Failed: '.$e->getMessage(), $e->getTrace()); + Log::error('Customer Profile Update Failed: ', [$e->getMessage(), $e->getTrace()]); return back()->withInput()->with('error', 'Something went wrong.'); } @@ -51,7 +51,7 @@ public function destroy(Customer $customer) return back()->with('success', 'Customer deleted successfully.'); } catch (\Throwable $e) { - Log::error('Customer Delete Failed: '.$e->getMessage(), $e->getTrace()); + Log::error('Customer Delete Failed: ', [$e->getMessage(), $e->getTrace()]); return back()->with('error', 'Something went wrong.'); } diff --git a/app/Http/Requests/StoreBrokerProfileRequest.php b/app/Http/Requests/StoreBrokerProfileRequest.php index 44b4cf7..c2bb96a 100644 --- a/app/Http/Requests/StoreBrokerProfileRequest.php +++ b/app/Http/Requests/StoreBrokerProfileRequest.php @@ -2,9 +2,11 @@ namespace App\Http\Requests; +use AllowDynamicProperties; use Illuminate\Foundation\Http\FormRequest; use Illuminate\Validation\Rule; +#[AllowDynamicProperties] class StoreBrokerProfileRequest extends FormRequest { /** @@ -12,7 +14,17 @@ class StoreBrokerProfileRequest extends FormRequest */ public function authorize(): bool { - return $this->user()->isBroker(); + // If this request is by a broker profile, then only allow the owner to update it. + if (isset($this->profile)) { + $this->user = $this->profile; + + return $this->user()->id === $this->profile->id; + } + + // If this request is by an admin, then allow them to update any profile. + $this->user = $this->broker->user; + + return $this->user()->isAdmin(); } /** @@ -25,7 +37,7 @@ public function rules(): array return [ 'name' => 'required|string|min:3|max:255', 'bio' => 'required|string|min:10|max:255', - 'email' => ['required', 'email', 'max:255', Rule::unique('users')->ignore($this->user()->id)], + 'email' => ['required', 'email', 'max:255', Rule::unique('users')->ignore($this->user->id)], 'phone' => 'required|string|min:10|max:255', 'location' => 'required|string|min:3|max:255', ]; diff --git a/app/Models/Broker.php b/app/Models/Broker.php index 8ac4408..978c7c1 100644 --- a/app/Models/Broker.php +++ b/app/Models/Broker.php @@ -7,6 +7,8 @@ class Broker extends Model { + protected $fillable = ['bio', 'location', 'phone']; + protected function casts(): array { return [ diff --git a/composer.json b/composer.json index 266a839..746e4aa 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,6 @@ }, "require-dev": { "fakerphp/faker": "^1.23", - "laradumps/laradumps": "^5.0", "laravel/pail": "^1.2.2", "laravel/pint": "^1.24", "laravel/sail": "^1.41", diff --git a/composer.lock b/composer.lock index 15d83e2..1ee4c57 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d2215c7e3da7601aa624d057baef6449", + "content-hash": "2f3167c1eddf52a1400c85a1ac601d4d", "packages": [ { "name": "blade-ui-kit/blade-heroicons", @@ -1204,16 +1204,16 @@ }, { "name": "laravel/framework", - "version": "v12.48.1", + "version": "v12.49.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "0f0974a9769378ccd9c9935c09b9927f3a606830" + "reference": "4bde4530545111d8bdd1de6f545fa8824039fcb5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/0f0974a9769378ccd9c9935c09b9927f3a606830", - "reference": "0f0974a9769378ccd9c9935c09b9927f3a606830", + "url": "https://api.github.com/repos/laravel/framework/zipball/4bde4530545111d8bdd1de6f545fa8824039fcb5", + "reference": "4bde4530545111d8bdd1de6f545fa8824039fcb5", "shasum": "" }, "require": { @@ -1422,20 +1422,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2026-01-20T16:12:36+00:00" + "time": "2026-01-28T03:40:49+00:00" }, { "name": "laravel/prompts", - "version": "v0.3.10", + "version": "v0.3.11", "source": { "type": "git", "url": "https://github.com/laravel/prompts.git", - "reference": "360ba095ef9f51017473505191fbd4ab73e1cab3" + "reference": "dd2a2ed95acacbcccd32fd98dee4c946ae7a7217" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/prompts/zipball/360ba095ef9f51017473505191fbd4ab73e1cab3", - "reference": "360ba095ef9f51017473505191fbd4ab73e1cab3", + "url": "https://api.github.com/repos/laravel/prompts/zipball/dd2a2ed95acacbcccd32fd98dee4c946ae7a7217", + "reference": "dd2a2ed95acacbcccd32fd98dee4c946ae7a7217", "shasum": "" }, "require": { @@ -1479,9 +1479,9 @@ "description": "Add beautiful and user-friendly forms to your command-line applications.", "support": { "issues": "https://github.com/laravel/prompts/issues", - "source": "https://github.com/laravel/prompts/tree/v0.3.10" + "source": "https://github.com/laravel/prompts/tree/v0.3.11" }, - "time": "2026-01-13T20:29:29+00:00" + "time": "2026-01-27T02:55:06+00:00" }, { "name": "laravel/serializable-closure", @@ -1801,16 +1801,16 @@ }, { "name": "league/flysystem", - "version": "3.30.2", + "version": "3.31.0", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "5966a8ba23e62bdb518dd9e0e665c2dbd4b5b277" + "reference": "1717e0b3642b0df65ecb0cc89cdd99fa840672ff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/5966a8ba23e62bdb518dd9e0e665c2dbd4b5b277", - "reference": "5966a8ba23e62bdb518dd9e0e665c2dbd4b5b277", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/1717e0b3642b0df65ecb0cc89cdd99fa840672ff", + "reference": "1717e0b3642b0df65ecb0cc89cdd99fa840672ff", "shasum": "" }, "require": { @@ -1878,22 +1878,22 @@ ], "support": { "issues": "https://github.com/thephpleague/flysystem/issues", - "source": "https://github.com/thephpleague/flysystem/tree/3.30.2" + "source": "https://github.com/thephpleague/flysystem/tree/3.31.0" }, - "time": "2025-11-10T17:13:11+00:00" + "time": "2026-01-23T15:38:47+00:00" }, { "name": "league/flysystem-local", - "version": "3.30.2", + "version": "3.31.0", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem-local.git", - "reference": "ab4f9d0d672f601b102936aa728801dd1a11968d" + "reference": "2f669db18a4c20c755c2bb7d3a7b0b2340488079" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/ab4f9d0d672f601b102936aa728801dd1a11968d", - "reference": "ab4f9d0d672f601b102936aa728801dd1a11968d", + "url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/2f669db18a4c20c755c2bb7d3a7b0b2340488079", + "reference": "2f669db18a4c20c755c2bb7d3a7b0b2340488079", "shasum": "" }, "require": { @@ -1927,9 +1927,9 @@ "local" ], "support": { - "source": "https://github.com/thephpleague/flysystem-local/tree/3.30.2" + "source": "https://github.com/thephpleague/flysystem-local/tree/3.31.0" }, - "time": "2025-11-10T11:23:37+00:00" + "time": "2026-01-23T15:30:45+00:00" }, { "name": "league/mime-type-detection", @@ -3519,16 +3519,16 @@ }, { "name": "symfony/console", - "version": "v7.4.3", + "version": "v7.4.4", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "732a9ca6cd9dfd940c639062d5edbde2f6727fb6" + "reference": "41e38717ac1dd7a46b6bda7d6a82af2d98a78894" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/732a9ca6cd9dfd940c639062d5edbde2f6727fb6", - "reference": "732a9ca6cd9dfd940c639062d5edbde2f6727fb6", + "url": "https://api.github.com/repos/symfony/console/zipball/41e38717ac1dd7a46b6bda7d6a82af2d98a78894", + "reference": "41e38717ac1dd7a46b6bda7d6a82af2d98a78894", "shasum": "" }, "require": { @@ -3593,7 +3593,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.4.3" + "source": "https://github.com/symfony/console/tree/v7.4.4" }, "funding": [ { @@ -3613,7 +3613,7 @@ "type": "tidelift" } ], - "time": "2025-12-23T14:50:43+00:00" + "time": "2026-01-13T11:36:38+00:00" }, { "name": "symfony/css-selector", @@ -3753,16 +3753,16 @@ }, { "name": "symfony/error-handler", - "version": "v7.4.0", + "version": "v7.4.4", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "48be2b0653594eea32dcef130cca1c811dcf25c2" + "reference": "8da531f364ddfee53e36092a7eebbbd0b775f6b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/48be2b0653594eea32dcef130cca1c811dcf25c2", - "reference": "48be2b0653594eea32dcef130cca1c811dcf25c2", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/8da531f364ddfee53e36092a7eebbbd0b775f6b8", + "reference": "8da531f364ddfee53e36092a7eebbbd0b775f6b8", "shasum": "" }, "require": { @@ -3811,7 +3811,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v7.4.0" + "source": "https://github.com/symfony/error-handler/tree/v7.4.4" }, "funding": [ { @@ -3831,20 +3831,20 @@ "type": "tidelift" } ], - "time": "2025-11-05T14:29:59+00:00" + "time": "2026-01-20T16:42:42+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v8.0.0", + "version": "v8.0.4", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "573f95783a2ec6e38752979db139f09fec033f03" + "reference": "99301401da182b6cfaa4700dbe9987bb75474b47" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/573f95783a2ec6e38752979db139f09fec033f03", - "reference": "573f95783a2ec6e38752979db139f09fec033f03", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/99301401da182b6cfaa4700dbe9987bb75474b47", + "reference": "99301401da182b6cfaa4700dbe9987bb75474b47", "shasum": "" }, "require": { @@ -3896,7 +3896,7 @@ "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/v8.0.0" + "source": "https://github.com/symfony/event-dispatcher/tree/v8.0.4" }, "funding": [ { @@ -3916,7 +3916,7 @@ "type": "tidelift" } ], - "time": "2025-10-30T14:17:19+00:00" + "time": "2026-01-05T11:45:55+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -3996,16 +3996,16 @@ }, { "name": "symfony/finder", - "version": "v7.4.3", + "version": "v7.4.4", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "fffe05569336549b20a1be64250b40516d6e8d06" + "reference": "01b24a145bbeaa7141e75887ec904c34a6728a5f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/fffe05569336549b20a1be64250b40516d6e8d06", - "reference": "fffe05569336549b20a1be64250b40516d6e8d06", + "url": "https://api.github.com/repos/symfony/finder/zipball/01b24a145bbeaa7141e75887ec904c34a6728a5f", + "reference": "01b24a145bbeaa7141e75887ec904c34a6728a5f", "shasum": "" }, "require": { @@ -4040,7 +4040,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v7.4.3" + "source": "https://github.com/symfony/finder/tree/v7.4.4" }, "funding": [ { @@ -4060,20 +4060,20 @@ "type": "tidelift" } ], - "time": "2025-12-23T14:50:43+00:00" + "time": "2026-01-12T12:19:02+00:00" }, { "name": "symfony/http-foundation", - "version": "v7.4.3", + "version": "v7.4.4", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "a70c745d4cea48dbd609f4075e5f5cbce453bd52" + "reference": "977a554a34cf8edc95ca351fbecb1bb1ad05cc94" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/a70c745d4cea48dbd609f4075e5f5cbce453bd52", - "reference": "a70c745d4cea48dbd609f4075e5f5cbce453bd52", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/977a554a34cf8edc95ca351fbecb1bb1ad05cc94", + "reference": "977a554a34cf8edc95ca351fbecb1bb1ad05cc94", "shasum": "" }, "require": { @@ -4122,7 +4122,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v7.4.3" + "source": "https://github.com/symfony/http-foundation/tree/v7.4.4" }, "funding": [ { @@ -4142,20 +4142,20 @@ "type": "tidelift" } ], - "time": "2025-12-23T14:23:49+00:00" + "time": "2026-01-09T12:14:21+00:00" }, { "name": "symfony/http-kernel", - "version": "v7.4.3", + "version": "v7.4.4", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "885211d4bed3f857b8c964011923528a55702aa5" + "reference": "48b067768859f7b68acf41dfb857a5a4be00acdd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/885211d4bed3f857b8c964011923528a55702aa5", - "reference": "885211d4bed3f857b8c964011923528a55702aa5", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/48b067768859f7b68acf41dfb857a5a4be00acdd", + "reference": "48b067768859f7b68acf41dfb857a5a4be00acdd", "shasum": "" }, "require": { @@ -4241,7 +4241,7 @@ "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/v7.4.3" + "source": "https://github.com/symfony/http-kernel/tree/v7.4.4" }, "funding": [ { @@ -4261,20 +4261,20 @@ "type": "tidelift" } ], - "time": "2025-12-31T08:43:57+00:00" + "time": "2026-01-24T22:13:01+00:00" }, { "name": "symfony/mailer", - "version": "v7.4.3", + "version": "v7.4.4", "source": { "type": "git", "url": "https://github.com/symfony/mailer.git", - "reference": "e472d35e230108231ccb7f51eb6b2100cac02ee4" + "reference": "7b750074c40c694ceb34cb926d6dffee231c5cd6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mailer/zipball/e472d35e230108231ccb7f51eb6b2100cac02ee4", - "reference": "e472d35e230108231ccb7f51eb6b2100cac02ee4", + "url": "https://api.github.com/repos/symfony/mailer/zipball/7b750074c40c694ceb34cb926d6dffee231c5cd6", + "reference": "7b750074c40c694ceb34cb926d6dffee231c5cd6", "shasum": "" }, "require": { @@ -4325,7 +4325,7 @@ "description": "Helps sending emails", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/mailer/tree/v7.4.3" + "source": "https://github.com/symfony/mailer/tree/v7.4.4" }, "funding": [ { @@ -4345,20 +4345,20 @@ "type": "tidelift" } ], - "time": "2025-12-16T08:02:06+00:00" + "time": "2026-01-08T08:25:11+00:00" }, { "name": "symfony/mime", - "version": "v7.4.0", + "version": "v7.4.4", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "bdb02729471be5d047a3ac4a69068748f1a6be7a" + "reference": "40945014c0a9471ccfe19673c54738fa19367a3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/bdb02729471be5d047a3ac4a69068748f1a6be7a", - "reference": "bdb02729471be5d047a3ac4a69068748f1a6be7a", + "url": "https://api.github.com/repos/symfony/mime/zipball/40945014c0a9471ccfe19673c54738fa19367a3c", + "reference": "40945014c0a9471ccfe19673c54738fa19367a3c", "shasum": "" }, "require": { @@ -4414,7 +4414,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v7.4.0" + "source": "https://github.com/symfony/mime/tree/v7.4.4" }, "funding": [ { @@ -4434,7 +4434,7 @@ "type": "tidelift" } ], - "time": "2025-11-16T10:14:42+00:00" + "time": "2026-01-08T16:12:55+00:00" }, { "name": "symfony/polyfill-ctype", @@ -5267,16 +5267,16 @@ }, { "name": "symfony/process", - "version": "v7.4.3", + "version": "v7.4.4", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "2f8e1a6cdf590ca63715da4d3a7a3327404a523f" + "reference": "626f07a53f4b4e2f00e11824cc29f928d797783b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/2f8e1a6cdf590ca63715da4d3a7a3327404a523f", - "reference": "2f8e1a6cdf590ca63715da4d3a7a3327404a523f", + "url": "https://api.github.com/repos/symfony/process/zipball/626f07a53f4b4e2f00e11824cc29f928d797783b", + "reference": "626f07a53f4b4e2f00e11824cc29f928d797783b", "shasum": "" }, "require": { @@ -5308,7 +5308,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.4.3" + "source": "https://github.com/symfony/process/tree/v7.4.4" }, "funding": [ { @@ -5328,20 +5328,20 @@ "type": "tidelift" } ], - "time": "2025-12-19T10:00:43+00:00" + "time": "2026-01-20T09:23:51+00:00" }, { "name": "symfony/routing", - "version": "v7.4.3", + "version": "v7.4.4", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "5d3fd7adf8896c2fdb54e2f0f35b1bcbd9e45090" + "reference": "0798827fe2c79caeed41d70b680c2c3507d10147" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/5d3fd7adf8896c2fdb54e2f0f35b1bcbd9e45090", - "reference": "5d3fd7adf8896c2fdb54e2f0f35b1bcbd9e45090", + "url": "https://api.github.com/repos/symfony/routing/zipball/0798827fe2c79caeed41d70b680c2c3507d10147", + "reference": "0798827fe2c79caeed41d70b680c2c3507d10147", "shasum": "" }, "require": { @@ -5393,7 +5393,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v7.4.3" + "source": "https://github.com/symfony/routing/tree/v7.4.4" }, "funding": [ { @@ -5413,7 +5413,7 @@ "type": "tidelift" } ], - "time": "2025-12-19T10:00:43+00:00" + "time": "2026-01-12T12:19:02+00:00" }, { "name": "symfony/service-contracts", @@ -5504,16 +5504,16 @@ }, { "name": "symfony/string", - "version": "v8.0.1", + "version": "v8.0.4", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "ba65a969ac918ce0cc3edfac6cdde847eba231dc" + "reference": "758b372d6882506821ed666032e43020c4f57194" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/ba65a969ac918ce0cc3edfac6cdde847eba231dc", - "reference": "ba65a969ac918ce0cc3edfac6cdde847eba231dc", + "url": "https://api.github.com/repos/symfony/string/zipball/758b372d6882506821ed666032e43020c4f57194", + "reference": "758b372d6882506821ed666032e43020c4f57194", "shasum": "" }, "require": { @@ -5570,7 +5570,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v8.0.1" + "source": "https://github.com/symfony/string/tree/v8.0.4" }, "funding": [ { @@ -5590,20 +5590,20 @@ "type": "tidelift" } ], - "time": "2025-12-01T09:13:36+00:00" + "time": "2026-01-12T12:37:40+00:00" }, { "name": "symfony/translation", - "version": "v8.0.3", + "version": "v8.0.4", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "60a8f11f0e15c48f2cc47c4da53873bb5b62135d" + "reference": "db70c8ce7db74fd2da7b1d268db46b2a8ce32c10" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/60a8f11f0e15c48f2cc47c4da53873bb5b62135d", - "reference": "60a8f11f0e15c48f2cc47c4da53873bb5b62135d", + "url": "https://api.github.com/repos/symfony/translation/zipball/db70c8ce7db74fd2da7b1d268db46b2a8ce32c10", + "reference": "db70c8ce7db74fd2da7b1d268db46b2a8ce32c10", "shasum": "" }, "require": { @@ -5663,7 +5663,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v8.0.3" + "source": "https://github.com/symfony/translation/tree/v8.0.4" }, "funding": [ { @@ -5683,7 +5683,7 @@ "type": "tidelift" } ], - "time": "2025-12-21T10:59:45+00:00" + "time": "2026-01-13T13:06:50+00:00" }, { "name": "symfony/translation-contracts", @@ -5769,16 +5769,16 @@ }, { "name": "symfony/uid", - "version": "v7.4.0", + "version": "v7.4.4", "source": { "type": "git", "url": "https://github.com/symfony/uid.git", - "reference": "2498e9f81b7baa206f44de583f2f48350b90142c" + "reference": "7719ce8aba76be93dfe249192f1fbfa52c588e36" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/uid/zipball/2498e9f81b7baa206f44de583f2f48350b90142c", - "reference": "2498e9f81b7baa206f44de583f2f48350b90142c", + "url": "https://api.github.com/repos/symfony/uid/zipball/7719ce8aba76be93dfe249192f1fbfa52c588e36", + "reference": "7719ce8aba76be93dfe249192f1fbfa52c588e36", "shasum": "" }, "require": { @@ -5823,7 +5823,7 @@ "uuid" ], "support": { - "source": "https://github.com/symfony/uid/tree/v7.4.0" + "source": "https://github.com/symfony/uid/tree/v7.4.4" }, "funding": [ { @@ -5843,20 +5843,20 @@ "type": "tidelift" } ], - "time": "2025-09-25T11:02:55+00:00" + "time": "2026-01-03T23:30:35+00:00" }, { "name": "symfony/var-dumper", - "version": "v7.4.3", + "version": "v7.4.4", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "7e99bebcb3f90d8721890f2963463280848cba92" + "reference": "0e4769b46a0c3c62390d124635ce59f66874b282" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/7e99bebcb3f90d8721890f2963463280848cba92", - "reference": "7e99bebcb3f90d8721890f2963463280848cba92", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/0e4769b46a0c3c62390d124635ce59f66874b282", + "reference": "0e4769b46a0c3c62390d124635ce59f66874b282", "shasum": "" }, "require": { @@ -5910,7 +5910,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v7.4.3" + "source": "https://github.com/symfony/var-dumper/tree/v7.4.4" }, "funding": [ { @@ -5930,7 +5930,7 @@ "type": "tidelift" } ], - "time": "2025-12-18T07:04:31+00:00" + "time": "2026-01-01T22:13:48+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -6594,148 +6594,6 @@ }, "time": "2025-03-19T14:43:43+00:00" }, - { - "name": "laradumps/laradumps", - "version": "v5.0.1", - "source": { - "type": "git", - "url": "https://github.com/laradumps/laradumps.git", - "reference": "e7b3119b50124942cb1062fcbbd0036a27312d6e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laradumps/laradumps/zipball/e7b3119b50124942cb1062fcbbd0036a27312d6e", - "reference": "e7b3119b50124942cb1062fcbbd0036a27312d6e", - "shasum": "" - }, - "require": { - "illuminate/mail": "^11.0|^12.0", - "illuminate/support": "^11.0|^12.0", - "laradumps/laradumps-core": "^4.0.1", - "php": "^8.2" - }, - "require-dev": { - "larastan/larastan": "^3.8", - "laravel/framework": "^11.0|^12.0", - "laravel/pint": "^1.26.0", - "livewire/livewire": "^3.7.1|^4.0", - "mockery/mockery": "^1.6.12", - "orchestra/testbench-core": "^9.4|^10.0", - "pestphp/pest": "^3.7.0|^4.0.0", - "symfony/var-dumper": "^7.1.3|^8.0" - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "LaraDumps\\LaraDumps\\LaraDumpsServiceProvider" - ] - } - }, - "autoload": { - "files": [ - "src/functions.php" - ], - "psr-4": { - "LaraDumps\\LaraDumps\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Luan Freitas", - "email": "luanfreitas10@protonmail.com", - "role": "Developer" - } - ], - "description": "LaraDumps is a friendly app designed to boost your Laravel PHP coding and debugging experience.", - "homepage": "https://github.com/laradumps/laradumps", - "support": { - "issues": "https://github.com/laradumps/laradumps/issues", - "source": "https://github.com/laradumps/laradumps/tree/v5.0.1" - }, - "funding": [ - { - "url": "https://github.com/luanfreitasdev", - "type": "github" - } - ], - "time": "2026-01-15T18:01:57+00:00" - }, - { - "name": "laradumps/laradumps-core", - "version": "v4.0.1", - "source": { - "type": "git", - "url": "https://github.com/laradumps/laradumps-core.git", - "reference": "162ceebac8e7253332270421b74a12a94a6f28b8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laradumps/laradumps-core/zipball/162ceebac8e7253332270421b74a12a94a6f28b8", - "reference": "162ceebac8e7253332270421b74a12a94a6f28b8", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "php": "^8.2", - "ramsey/uuid": "^4.9.1", - "spatie/backtrace": "^1.5", - "symfony/console": "^6.4|^7.0|^8.0", - "symfony/finder": "^6.4|^7.0|^8.0", - "symfony/process": "^6.4|^7.0|^8.0", - "symfony/var-dumper": "^6.4|^7.0|^8.0", - "symfony/yaml": "^6.4|^7.0|^8.0" - }, - "require-dev": { - "illuminate/support": "^12", - "laravel/pint": "^1.26.0", - "pestphp/pest": "^3.0|^4.0", - "phpstan/phpstan": "^1.10.50" - }, - "suggest": { - "nunomaduro/termwind": "For a better terminal experience" - }, - "bin": [ - "bin/laradumps" - ], - "type": "library", - "autoload": { - "files": [ - "src/functions.php" - ], - "psr-4": { - "LaraDumps\\LaraDumpsCore\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Luan Freitas", - "email": "luanfreitas10@protonmail.com", - "role": "Developer" - } - ], - "description": "LaraDumps is a friendly app designed to boost your Laravel / PHP coding and debugging experience.", - "homepage": "https://github.com/laradumps/laradumps-core", - "support": { - "issues": "https://github.com/laradumps/laradumps-core/issues", - "source": "https://github.com/laradumps/laradumps-core/tree/v4.0.1" - }, - "funding": [ - { - "url": "https://github.com/luanfreitasdev", - "type": "github" - } - ], - "time": "2026-01-15T17:33:27+00:00" - }, { "name": "laravel/pail", "version": "v1.2.4", @@ -7189,20 +7047,20 @@ }, { "name": "pestphp/pest", - "version": "v4.3.1", + "version": "v4.3.2", "source": { "type": "git", "url": "https://github.com/pestphp/pest.git", - "reference": "bc57a84e77afd4544ff9643a6858f68d05aeab96" + "reference": "3a4329ddc7a2b67c19fca8342a668b39be3ae398" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pestphp/pest/zipball/bc57a84e77afd4544ff9643a6858f68d05aeab96", - "reference": "bc57a84e77afd4544ff9643a6858f68d05aeab96", + "url": "https://api.github.com/repos/pestphp/pest/zipball/3a4329ddc7a2b67c19fca8342a668b39be3ae398", + "reference": "3a4329ddc7a2b67c19fca8342a668b39be3ae398", "shasum": "" }, "require": { - "brianium/paratest": "^7.16.0", + "brianium/paratest": "^7.16.1", "nunomaduro/collision": "^8.8.3", "nunomaduro/termwind": "^2.3.3", "pestphp/pest-plugin": "^4.0.0", @@ -7210,18 +7068,18 @@ "pestphp/pest-plugin-mutate": "^4.0.1", "pestphp/pest-plugin-profanity": "^4.2.1", "php": "^8.3.0", - "phpunit/phpunit": "^12.5.4", - "symfony/process": "^7.4.3|^8.0.0" + "phpunit/phpunit": "^12.5.8", + "symfony/process": "^7.4.4|^8.0.0" }, "conflict": { "filp/whoops": "<2.18.3", - "phpunit/phpunit": ">12.5.4", + "phpunit/phpunit": ">12.5.8", "sebastian/exporter": "<7.0.0", "webmozart/assert": "<1.11.0" }, "require-dev": { "pestphp/pest-dev-tools": "^4.0.0", - "pestphp/pest-plugin-browser": "^4.1.1", + "pestphp/pest-plugin-browser": "^4.2.1", "pestphp/pest-plugin-type-coverage": "^4.0.3", "psy/psysh": "^0.12.18" }, @@ -7289,7 +7147,7 @@ ], "support": { "issues": "https://github.com/pestphp/pest/issues", - "source": "https://github.com/pestphp/pest/tree/v4.3.1" + "source": "https://github.com/pestphp/pest/tree/v4.3.2" }, "funding": [ { @@ -7301,7 +7159,7 @@ "type": "github" } ], - "time": "2026-01-04T16:29:59+00:00" + "time": "2026-01-28T01:01:19+00:00" }, { "name": "pestphp/pest-plugin", @@ -7944,16 +7802,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "2.3.1", + "version": "2.3.2", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "16dbf9937da8d4528ceb2145c9c7c0bd29e26374" + "reference": "a004701b11273a26cd7955a61d67a7f1e525a45a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/16dbf9937da8d4528ceb2145c9c7c0bd29e26374", - "reference": "16dbf9937da8d4528ceb2145c9c7c0bd29e26374", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/a004701b11273a26cd7955a61d67a7f1e525a45a", + "reference": "a004701b11273a26cd7955a61d67a7f1e525a45a", "shasum": "" }, "require": { @@ -7985,9 +7843,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/2.3.1" + "source": "https://github.com/phpstan/phpdoc-parser/tree/2.3.2" }, - "time": "2026-01-12T11:33:04+00:00" + "time": "2026-01-25T14:56:51+00:00" }, { "name": "phpunit/php-code-coverage", @@ -8325,16 +8183,16 @@ }, { "name": "phpunit/phpunit", - "version": "12.5.4", + "version": "12.5.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "4ba0e923f9d3fc655de22f9547c01d15a41fc93a" + "reference": "37ddb96c14bfee10304825edbb7e66d341ec6889" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/4ba0e923f9d3fc655de22f9547c01d15a41fc93a", - "reference": "4ba0e923f9d3fc655de22f9547c01d15a41fc93a", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/37ddb96c14bfee10304825edbb7e66d341ec6889", + "reference": "37ddb96c14bfee10304825edbb7e66d341ec6889", "shasum": "" }, "require": { @@ -8348,13 +8206,13 @@ "phar-io/manifest": "^2.0.4", "phar-io/version": "^3.2.1", "php": ">=8.3", - "phpunit/php-code-coverage": "^12.5.1", + "phpunit/php-code-coverage": "^12.5.2", "phpunit/php-file-iterator": "^6.0.0", "phpunit/php-invoker": "^6.0.0", "phpunit/php-text-template": "^5.0.0", "phpunit/php-timer": "^8.0.0", "sebastian/cli-parser": "^4.2.0", - "sebastian/comparator": "^7.1.3", + "sebastian/comparator": "^7.1.4", "sebastian/diff": "^7.0.0", "sebastian/environment": "^8.0.3", "sebastian/exporter": "^7.0.2", @@ -8402,7 +8260,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/12.5.4" + "source": "https://github.com/sebastianbergmann/phpunit/tree/12.5.8" }, "funding": [ { @@ -8426,7 +8284,7 @@ "type": "tidelift" } ], - "time": "2025-12-15T06:05:34+00:00" + "time": "2026-01-27T06:12:29+00:00" }, { "name": "sebastian/cli-parser", @@ -8499,16 +8357,16 @@ }, { "name": "sebastian/comparator", - "version": "7.1.3", + "version": "7.1.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "dc904b4bb3ab070865fa4068cd84f3da8b945148" + "reference": "6a7de5df2e094f9a80b40a522391a7e6022df5f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/dc904b4bb3ab070865fa4068cd84f3da8b945148", - "reference": "dc904b4bb3ab070865fa4068cd84f3da8b945148", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/6a7de5df2e094f9a80b40a522391a7e6022df5f6", + "reference": "6a7de5df2e094f9a80b40a522391a7e6022df5f6", "shasum": "" }, "require": { @@ -8567,7 +8425,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", "security": "https://github.com/sebastianbergmann/comparator/security/policy", - "source": "https://github.com/sebastianbergmann/comparator/tree/7.1.3" + "source": "https://github.com/sebastianbergmann/comparator/tree/7.1.4" }, "funding": [ { @@ -8587,7 +8445,7 @@ "type": "tidelift" } ], - "time": "2025-08-20T11:27:00+00:00" + "time": "2026-01-24T09:28:48+00:00" }, { "name": "sebastian/complexity", @@ -9325,70 +9183,6 @@ ], "time": "2025-02-07T05:00:38+00:00" }, - { - "name": "spatie/backtrace", - "version": "1.8.1", - "source": { - "type": "git", - "url": "https://github.com/spatie/backtrace.git", - "reference": "8c0f16a59ae35ec8c62d85c3c17585158f430110" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/spatie/backtrace/zipball/8c0f16a59ae35ec8c62d85c3c17585158f430110", - "reference": "8c0f16a59ae35ec8c62d85c3c17585158f430110", - "shasum": "" - }, - "require": { - "php": "^7.3 || ^8.0" - }, - "require-dev": { - "ext-json": "*", - "laravel/serializable-closure": "^1.3 || ^2.0", - "phpunit/phpunit": "^9.3 || ^11.4.3", - "spatie/phpunit-snapshot-assertions": "^4.2 || ^5.1.6", - "symfony/var-dumper": "^5.1 || ^6.0 || ^7.0" - }, - "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": { - "issues": "https://github.com/spatie/backtrace/issues", - "source": "https://github.com/spatie/backtrace/tree/1.8.1" - }, - "funding": [ - { - "url": "https://github.com/sponsors/spatie", - "type": "github" - }, - { - "url": "https://spatie.be/open-source/support-us", - "type": "other" - } - ], - "time": "2025-08-26T08:22:30+00:00" - }, { "name": "staabm/side-effects-detector", "version": "1.0.5", diff --git a/resources/css/app.css b/resources/css/app.css index 84b2235..ee7f61b 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -69,3 +69,7 @@ dialog { dialog[open] { animation: appear 300ms ease-in-out; } + +.ui-table tr td,th { + @apply py-1 +} diff --git a/resources/views/components/dashboard/admin/active-broker.blade.php b/resources/views/components/dashboard/admin/active-broker.blade.php new file mode 100644 index 0000000..defa86e --- /dev/null +++ b/resources/views/components/dashboard/admin/active-broker.blade.php @@ -0,0 +1,44 @@ +@props(['activeBrokers']) + + +

Active Brokers

+ + + Name + Email + Location + + + @forelse($activeBrokers as $broker) + + {{$broker->user->name}} + {{$broker->user->email}} + {{$broker->location}} + +
+ + + +
+ @csrf + @method('DELETE') + + + +
+ + + +
+
+
+ @empty + + No Broker found + + @endforelse +
+
diff --git a/resources/views/components/dashboard/admin/broker-approval.blade.php b/resources/views/components/dashboard/admin/broker-approval.blade.php new file mode 100644 index 0000000..8c571c7 --- /dev/null +++ b/resources/views/components/dashboard/admin/broker-approval.blade.php @@ -0,0 +1,49 @@ +@props(['pendingBrokers']) + + +

Broker Approvals

+ + + Name + Email + Location + + + @forelse($pendingBrokers as $broker) + + {{$broker->user->name}} + {{$broker->user->email}} + {{$broker->location}} + +
+
+ @csrf + + + +
+
+ @csrf + @method('DELETE') + + + +
+ + + +
+
+
+ @empty + + No Broker found + + @endforelse +
+
diff --git a/resources/views/components/dashboard/admin/sidebar.blade.php b/resources/views/components/dashboard/admin/sidebar.blade.php index 04618af..9165b2c 100644 --- a/resources/views/components/dashboard/admin/sidebar.blade.php +++ b/resources/views/components/dashboard/admin/sidebar.blade.php @@ -20,13 +20,16 @@ class="flex flex-col p-4 pt-6 justify-between font-medium h-full w-full overflow - + - - + + diff --git a/resources/views/components/ui/button-sm.blade.php b/resources/views/components/ui/button-sm.blade.php index fd885d0..849a087 100644 --- a/resources/views/components/ui/button-sm.blade.php +++ b/resources/views/components/ui/button-sm.blade.php @@ -1,19 +1,30 @@ -@props(['variant' => '', 'link' => '', 'external' => false]) +@props(['variant' => '', 'link' => '', 'external' => false, 'tooltip' => '']) @php -$variants = [ - 'neutral' => 'bg-primary-600 text-white', - 'ghost' => 'bg-gray-100 text-black text-sm', - 'red' => 'bg-red-500 text-red-100 text-sm' -]; + $variants = [ + 'neutral' => 'bg-primary-600 text-white', + 'ghost' => 'bg-gray-200 text-gray-700 text-sm', + 'red' => 'bg-red-100 text-red-500 text-sm', + 'green' => 'bg-green-100 text-green-700 text-sm', + ]; -$variantClass = $variants[$variant] ?? ''; + $variantClass = $variants[$variant] ?? ''; @endphp -@if($link !== '') - merge(['class' => "inline-flex px-2 py-1 text-xs rounded-md font-medium hover:opacity-80 hover: active:scale-80 transition-all duration-300 ease-in-out $variantClass"])}}> - {{$slot}} - -@else - -@endif +
+ @if($link !== '') + merge(['class' => "inline-flex px-2 py-1 text-xs rounded-md font-medium hover:opacity-80 hover: active:scale-80 transition-all duration-300 ease-in-out $variantClass"])}}> + {{$slot}} + + @else + + @endif + @if($tooltip !== '') + + @endif +
diff --git a/resources/views/components/ui/table/index.blade.php b/resources/views/components/ui/table/index.blade.php index 5c4a82c..6157c3b 100644 --- a/resources/views/components/ui/table/index.blade.php +++ b/resources/views/components/ui/table/index.blade.php @@ -1,5 +1,5 @@
- +
{{$slot}}
diff --git a/resources/views/components/ui/table/row.blade.php b/resources/views/components/ui/table/row.blade.php index 50e0949..ceac30f 100644 --- a/resources/views/components/ui/table/row.blade.php +++ b/resources/views/components/ui/table/row.blade.php @@ -1,7 +1,7 @@ {{$slot}} @if(($actions ?? '') !== '') - + {{$actions ?? ''}} @endif diff --git a/resources/views/dashboards/admin/brokers/edit.blade.php b/resources/views/dashboards/admin/brokers/edit.blade.php new file mode 100644 index 0000000..7dbbc63 --- /dev/null +++ b/resources/views/dashboards/admin/brokers/edit.blade.php @@ -0,0 +1,13 @@ + + + + + +
+ +
+
diff --git a/resources/views/dashboards/admin/brokers/index.blade.php b/resources/views/dashboards/admin/brokers/index.blade.php new file mode 100644 index 0000000..e7eaddb --- /dev/null +++ b/resources/views/dashboards/admin/brokers/index.blade.php @@ -0,0 +1,12 @@ + + + + +
+ + +
+
diff --git a/resources/views/dashboards/admin/customers/index.blade.php b/resources/views/dashboards/admin/customers/index.blade.php index 11663af..e2652f2 100644 --- a/resources/views/dashboards/admin/customers/index.blade.php +++ b/resources/views/dashboards/admin/customers/index.blade.php @@ -44,7 +44,7 @@ class=" h-full items-center flex justify-center"> @empty - No Deals found + No Customer found @endforelse diff --git a/routes/web/admin.php b/routes/web/admin.php index 3163f3a..7086948 100644 --- a/routes/web/admin.php +++ b/routes/web/admin.php @@ -2,6 +2,7 @@ use App\Enums\UserTypes; use App\Http\Controllers\Admin\AdminDashboardController; +use App\Http\Controllers\Admin\BrokerController; use App\Http\Controllers\Admin\CustomerController; use App\Http\Middleware\HasRole; @@ -11,4 +12,7 @@ ->group(function () { Route::get('dashboard', AdminDashboardController::class)->name('dashboard'); Route::resource('customers', CustomerController::class)->except('show', 'create', 'store'); + Route::resource('brokers', BrokerController::class)->except('show', 'create', 'store'); + + Route::post('/brokers/approve/{broker}', [BrokerController::class, 'approve'])->name('brokers.approve'); });