Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
CO-OP Search
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kittisak Maneewong
CO-OP Search
Commits
16d37ebd
Commit
16d37ebd
authored
Apr 24, 2019
by
Kittisak Maneewong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edit
parent
eae7ea16
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
184 additions
and
5 deletions
+184
-5
Applicant.php
app/Applicant.php
+10
-0
ApplicantController.php
app/Http/Controllers/ApplicantController.php
+94
-0
2019_04_24_070106_create_applicants_table.php
.../migrations/2019_04_24_070106_create_applicants_table.php
+40
-0
app.js
public/js/app.js
+0
-0
Company1556090173.jpeg
public/uploads/Company1556090173.jpeg
+0
-0
RegisterJob.vue
resources/js/views/RegisterJob.vue
+38
-5
api.php
routes/api.php
+2
-0
No files found.
app/Applicant.php
0 → 100644
View file @
16d37ebd
<?php
namespace
App
;
use
Illuminate\Database\Eloquent\Model
;
class
Applicant
extends
Model
{
//
}
app/Http/Controllers/ApplicantController.php
0 → 100644
View file @
16d37ebd
<?php
namespace
App\Http\Controllers
;
use
App\Applicant
;
use
Illuminate\Http\Request
;
class
ApplicantController
extends
Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public
function
index
()
{
//
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public
function
create
()
{
//
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public
function
store
(
Request
$request
)
{
$applicant
=
new
Applicant
();
$applicant
->
email
=
$request
->
get
(
'email'
);
$applicant
->
name
=
$request
->
get
(
'name'
);
$applicant
->
degree
=
$request
->
get
(
'degree'
);
$applicant
->
major
=
$request
->
get
(
'major'
);
$applicant
->
faculty
=
$request
->
get
(
'faculty'
);
$applicant
->
university
=
$request
->
get
(
'university'
);
$applicant
->
gpax
=
$request
->
get
(
'gpax'
);
$applicant
->
job_id
=
$request
->
get
(
'job_id'
);
$applicant
->
save
();
}
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public
function
show
(
$id
)
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public
function
edit
(
$id
)
{
//
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public
function
update
(
Request
$request
,
$id
)
{
//
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public
function
destroy
(
$id
)
{
//
}
}
database/migrations/2019_04_24_070106_create_applicants_table.php
0 → 100644
View file @
16d37ebd
<?php
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
class
CreateApplicantsTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'applicants'
,
function
(
Blueprint
$table
)
{
$table
->
bigIncrements
(
'id'
);
$table
->
string
(
'email'
);
$table
->
string
(
'name'
);
$table
->
string
(
'degree'
)
->
nullable
();
$table
->
string
(
'major'
)
->
nullable
();
$table
->
string
(
'faculty'
)
->
nullable
();
$table
->
string
(
'university'
)
->
nullable
();
$table
->
string
(
'gpax'
)
->
nullable
();
$table
->
unsignedBigInteger
(
'job_id'
);
$table
->
foreign
(
'job_id'
)
->
references
(
'id'
)
->
on
(
'jobs'
);
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'applicants'
);
}
}
public/js/app.js
View file @
16d37ebd
This diff is collapsed.
Click to expand it.
public/uploads/Company1556090173.jpeg
0 → 100644
View file @
16d37ebd
124 KB
resources/js/views/RegisterJob.vue
View file @
16d37ebd
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
label=
"อีเมล"
label=
"อีเมล"
color=
"deep-orange"
color=
"deep-orange"
type=
"text"
type=
"text"
v-model=
"
registerJob_data.
email"
v-model=
"email"
required
required
></v-text-field>
></v-text-field>
<v-text-field
<v-text-field
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
label=
"ชื่อ"
label=
"ชื่อ"
color=
"deep-orange"
color=
"deep-orange"
type=
"text"
type=
"text"
v-model=
"
registerJob_data.
name"
v-model=
"name"
required
required
></v-text-field>
></v-text-field>
<v-text-field
<v-text-field
...
@@ -93,8 +93,6 @@ export default {
...
@@ -93,8 +93,6 @@ export default {
data
()
{
data
()
{
return
{
return
{
registerJob_data
:
{
registerJob_data
:
{
name
:
''
,
email
:
''
,
major
:
''
,
major
:
''
,
faculty
:
''
,
faculty
:
''
,
university
:
''
,
university
:
''
,
...
@@ -103,10 +101,45 @@ export default {
...
@@ -103,10 +101,45 @@ export default {
}
}
}
}
},
},
computed
:
{
name
()
{
return
this
.
$store
.
getters
.
getUser
.
name
},
email
()
{
return
this
.
$store
.
getters
.
getUser
.
email
}
},
methods
:
{
methods
:
{
registerJob
()
{
registerJob
()
{
if
(
this
.
$refs
.
registerJob
.
validate
())
{
if
(
this
.
$refs
.
registerJob
.
validate
())
{
axios
.
post
(
'/api/applicants'
,
{
job_id
:
this
.
id
,
email
:
this
.
email
,
name
:
this
.
name
,
degree
:
this
.
registerJob_data
.
degree
,
major
:
this
.
registerJob_data
.
major
,
faculty
:
this
.
registerJob_data
.
faculty
,
university
:
this
.
registerJob_data
.
university
,
gpax
:
this
.
registerJob_data
.
gpax
})
.
then
(
res
=>
{
this
.
$store
.
commit
(
'setSnackbar'
,
{
show
:
true
,
color
:
'success'
,
text
:
'สมัครงานสำเร็จ'
})
this
.
$store
.
commit
(
'setDialogJob'
,
false
)
this
.
registerJob_data
=
{
major
:
''
,
faculty
:
''
,
university
:
''
,
gpax
:
''
,
degree
:
''
}
})
.
catch
(
err
=>
{
console
.
log
(
err
.
response
)
})
}
else
{
}
else
{
this
.
$Loading
.
error
()
this
.
$Loading
.
error
()
}
}
...
...
routes/api.php
View file @
16d37ebd
...
@@ -23,6 +23,8 @@ Route::resource('/companys', 'CompanyController');
...
@@ -23,6 +23,8 @@ Route::resource('/companys', 'CompanyController');
Route
::
resource
(
'/jobs'
,
'JobController'
);
Route
::
resource
(
'/jobs'
,
'JobController'
);
Route
::
resource
(
'/applicants'
,
'ApplicantController'
);
Route
::
get
(
'/show'
,
'AppController@show'
);
Route
::
get
(
'/show'
,
'AppController@show'
);
Route
::
get
(
'/detail/{id}'
,
'AppController@detail'
);
Route
::
get
(
'/detail/{id}'
,
'AppController@detail'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment