Commit 722c0977 authored by Kittisak Maneewong's avatar Kittisak Maneewong

fix picture not show

parent eebd9060
......@@ -47,14 +47,14 @@ class CompanyController extends Controller
if ($request->get('imageCompany') !== 'https://asianinteriorservices.com/wp-content/uploads/2018/04/noImg.png') {
$image = $request->get('imageCompany');
$name = 'Company'.time().'.'.explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];
\Image::make($request->get('imageCompany'))->save(storage_path('uploads/').$name);
$imageCompany = $name;
\Image::make($request->get('imageCompany'))->save(public_path('uploads/').$name);
$imageCompany = '/uploads/'.$name;
}
if ($request->get('imageMap')) {
$image = $request->get('imageMap');
$name = 'Map'.time().'.'.explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];
\Image::make($request->get('imageMap'))->save(storage_path('uploads/').$name);
$imageMap = $name;
\Image::make($request->get('imageMap'))->save(public_path('uploads/').$name);
$imageMap = '/uploads/'.$name;
}
$company = new Company();
$company->imageCompany = $imageCompany;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -434,27 +434,27 @@ export default {
}
},
createJob () {
this.loading = true
if (this.amphoes.findIndex(x => x.amphoe_code === this.amphoe.amphoe_code) === -1) {this.amphoe = ''}
if (this.tumbons.findIndex(x => x.tumbon_code === this.tumbon.tumbon_code) === -1) {this.tumbon = ''}
if (this.company_data.zip_code === ' ') {this.company_data.zip_code = ''}
if (this.$refs.create.validate()) {
this.company_data.province = this.province.province
this.company_data.amphoe = this.amphoe.amphoe
this.company_data.tumbon = this.tumbon.tumbon
axios.post('/api/companys', this.company_data)
.then(res => {
this.loading = false
this.$router.push('/employer')
})
.catch(err => {
console.log(err.response)
this.loading = false
})
} else {
this.loading = false
this.$Loading.error()
}
// this.loading = true
// if (this.amphoes.findIndex(x => x.amphoe_code === this.amphoe.amphoe_code) === -1) {this.amphoe = ''}
// if (this.tumbons.findIndex(x => x.tumbon_code === this.tumbon.tumbon_code) === -1) {this.tumbon = ''}
// if (this.company_data.zip_code === ' ') {this.company_data.zip_code = ''}
// if (this.$refs.create.validate()) {
// this.company_data.province = this.province.province
// this.company_data.amphoe = this.amphoe.amphoe
// this.company_data.tumbon = this.tumbon.tumbon
// axios.post('/api/companys', this.company_data)
// .then(res => {
// this.loading = false
// this.$router.push('/employer')
// })
// .catch(err => {
// console.log(err.response)
// this.loading = false
// })
// } else {
// this.loading = false
// this.$Loading.error()
// }
},
showProvinces () {
axios.get('/api/province')
......
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