dealhub/app/Http/Requests/StoreBrokerProfileRequest.php
kusowl 2fba9f7ab8 refactor: replace user dashboard with explore page and improve broker UI components
- Removed `UserDashboardController` and related user dashboard views.
- Introduced `ExplorePageController` and redesigned `explore.blade.php` as the main user-facing page.
- Updated routing logic to redirect users (non-admin and non-broker) to the `explore` page.
- Added dedicated sidebar and layout components for the broker dashboard, improving structure and navigation.
2026-01-15 15:07:58 +05:30

34 lines
932 B
PHP

<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
class StoreBrokerProfileRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return $this->user()->isBroker();
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
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)],
'phone' => 'required|string|min:10|max:255',
'location' => 'required|string|min:3|max:255',
];
}
}