Commit 74fad557 authored by Kittisak Maneewong's avatar Kittisak Maneewong

update

parent 60590055
......@@ -18,4 +18,11 @@ class AppController extends Controller
->get();
return response()->json(['jobs' => $jobs]);
}
public function detail($id) {
$job = Job::join('companies', 'jobs.user_id', 'companies.user_id')
->where('jobs.id', $id)
->first();
return response()->json(['job' => $job]);
}
}
......@@ -66,7 +66,7 @@ class JobController extends Controller
* @return \Illuminate\Http\Response
*/
public function show($id)
{
{
$job = Job::where('user_id', $id)->get();
return response()->json(['jobs' => $job]);
}
......
This diff is collapsed.
......@@ -29,7 +29,7 @@
></v-text-field>
<v-combobox
v-model="job_data.job_type"
:items="items"
:items="jobs_data"
:rules="[v => !!v || 'จำเป็นต้องกรอก']"
label="ประเภทงาน"
placeholder=" "
......@@ -195,6 +195,7 @@
'ชาย',
'หญิง'
],
jobs_data: [],
job_data: {
id: null,
job_title: '',
......@@ -231,6 +232,7 @@
beforeMount () {
this.$store.dispatch('checkEmployer')
.then(res => {
console.log(res)
this.job_data.id = res.id
})
.catch(err => {
......
This diff is collapsed.
......@@ -155,7 +155,6 @@
</v-layout>
</v-flex>
</v-layout>
{{chkChip}}
</div>
</template>
......
......@@ -24,6 +24,7 @@ Route::resource('/companys', 'CompanyController');
Route::resource('/jobs', 'JobController');
Route::get('/show', 'AppController@show');
Route::get('/detail/{id}', 'AppController@detail');
Route::get('/province','DistrictController@provinces');
Route::get('/province/{province_code}/amphoe','DistrictController@amphoes');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment