I am building an app where users can upload a job where contractors can search for job and get in contact with new customers.
Now I have used laravel's standard Auth method to let users/client register, login and upload jobs. Now I want to build the contractor part of the app so my goal is a seperate registration and login and when the contractor logs in he can only browse the jobs and comment on jobs
Can I use laravel's Auth method to built this or what should my game plan be here?
Anyone has any experience with it? So I need to have a database users for my clients and a database Contractors but how do I register contractors? Do I make a new route,view and controller and write the create functien manually and use this MultiAuth method?
I figured out some of my routes it should look something like this:
// Authentication routes for users/clients
Route::get('auth/login', 'Auth\AuthController@getLogin');
Route::post('auth/login', 'Auth\AuthController@postLogin');
Route::get('auth/logout', 'Auth\AuthController@getLogout');
// Registration routes
Route::get('auth/register', 'Auth\AuthController@getRegister');
Route::get('contractor/auth/register', 'contractor\Auth\ContractorAuthController@getRegister');
Route::post('auth/register', 'Auth\AuthController@postRegister');
Route::post('Contractor\contractor/auth/register', 'Contractor\Auth\AuthController@postRegister');
and if this is possible how do I check if a contractor is logged in? I currently check if a user is logged in like this Auth:check()