Added a jobs functionality
This commit is contained in:
parent
e1d43a4bec
commit
10880536da
1 changed files with 15 additions and 6 deletions
|
@ -6,9 +6,15 @@ Route::get('/', function () {
|
||||||
return view('home', ['greeting'=>'Hello']);
|
return view('home', ['greeting'=>'Hello']);
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::get('/jobs', function() {
|
Route::get('/jobs', function () {
|
||||||
$jobs=[
|
return view('jobs', [
|
||||||
[
|
'jobs'=> Job::all()
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
class Job {
|
||||||
|
public static function all():array
|
||||||
|
{
|
||||||
|
return [[
|
||||||
'id'=>1,
|
'id'=>1,
|
||||||
'title'=>'Manager',
|
'title'=>'Manager',
|
||||||
'salary'=>'$50,000'
|
'salary'=>'$50,000'
|
||||||
|
@ -23,9 +29,12 @@ Route::get('/jobs', function() {
|
||||||
'title'=>'Assisstant',
|
'title'=>'Assisstant',
|
||||||
'salary'=>'$30,000'
|
'salary'=>'$30,000'
|
||||||
]
|
]
|
||||||
]
|
];
|
||||||
return view('jobs', $jobs);
|
}
|
||||||
);
|
}
|
||||||
|
|
||||||
|
// return view('jobs', ['jobs' => $jobs]);
|
||||||
|
// });
|
||||||
|
|
||||||
Route::get('/contact', function() {
|
Route::get('/contact', function() {
|
||||||
return view('contact');
|
return view('contact');
|
||||||
|
|
Loading…
Add table
Reference in a new issue