<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});
Route::get('/job-post-new', 'JobPostController@index')->name('JobPost');
Route::post('/job-post-new', 'JobPostController@saveJob')->name('jobpost');
Route::get('/job-posted', 'JobPostController@all_posted_jobs')->name('postedjobs');
Route::get('/job/{id}', 'JobPostController@job_view')->name('job');
Route::get('/job/edit/{id}', 'JobPostController@job_edit');
Route::post('/job/update/{id}', 'JobPostController@job_update');
Route::get('/job/del/{id}', 'JobPostController@job_del');
Route::get('/job/filedel/{filename}/{id}', 'JobPostController@file_del');
Route::get('/hired-workers', 'HiredWorkerController@index');
Route::post('/hire-worker', 'HiredWorkerController@hire_worker');
Route::get('/contract-view/{id}', 'HiredWorkerController@contract_view');
Route::post('/chat-save', 'ChatsController@chat_save');
Route::get('/give-paid-worker/{hired_id}', 'HiredWorkerController@give_paid');

Auth::routes();

Route::get('/home', 'HomeController@index')->name('home');
