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

update

parent 60590055
...@@ -18,4 +18,11 @@ class AppController extends Controller ...@@ -18,4 +18,11 @@ class AppController extends Controller
->get(); ->get();
return response()->json(['jobs' => $jobs]); 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]);
}
} }
This diff is collapsed.
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
></v-text-field> ></v-text-field>
<v-combobox <v-combobox
v-model="job_data.job_type" v-model="job_data.job_type"
:items="items" :items="jobs_data"
:rules="[v => !!v || 'จำเป็นต้องกรอก']" :rules="[v => !!v || 'จำเป็นต้องกรอก']"
label="ประเภทงาน" label="ประเภทงาน"
placeholder=" " placeholder=" "
...@@ -195,6 +195,7 @@ ...@@ -195,6 +195,7 @@
'ชาย', 'ชาย',
'หญิง' 'หญิง'
], ],
jobs_data: [],
job_data: { job_data: {
id: null, id: null,
job_title: '', job_title: '',
...@@ -231,6 +232,7 @@ ...@@ -231,6 +232,7 @@
beforeMount () { beforeMount () {
this.$store.dispatch('checkEmployer') this.$store.dispatch('checkEmployer')
.then(res => { .then(res => {
console.log(res)
this.job_data.id = res.id this.job_data.id = res.id
}) })
.catch(err => { .catch(err => {
......
This diff is collapsed.
...@@ -155,7 +155,6 @@ ...@@ -155,7 +155,6 @@
</v-layout> </v-layout>
</v-flex> </v-flex>
</v-layout> </v-layout>
{{chkChip}}
</div> </div>
</template> </template>
......
...@@ -24,6 +24,7 @@ Route::resource('/companys', 'CompanyController'); ...@@ -24,6 +24,7 @@ Route::resource('/companys', 'CompanyController');
Route::resource('/jobs', 'JobController'); Route::resource('/jobs', 'JobController');
Route::get('/show', 'AppController@show'); Route::get('/show', 'AppController@show');
Route::get('/detail/{id}', 'AppController@detail');
Route::get('/province','DistrictController@provinces'); Route::get('/province','DistrictController@provinces');
Route::get('/province/{province_code}/amphoe','DistrictController@amphoes'); 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