Fixed syntax in web.php, added product to git
This commit is contained in:
parent
e1d43a4bec
commit
50af8f11e0
3 changed files with 30 additions and 2 deletions
18
public/product.php
Normal file
18
public/product.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Product extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $attributes = [
|
||||
'id'
|
||||
'name',
|
||||
'price',
|
||||
'description'
|
||||
];
|
||||
}
|
10
resources/views/product
Normal file
10
resources/views/product
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
class Product
|
||||
{
|
||||
public $name;
|
||||
public $price;
|
||||
public $description;
|
||||
|
||||
}
|
||||
|
||||
public function getName
|
|
@ -23,9 +23,9 @@ Route::get('/jobs', function() {
|
|||
'title'=>'Assisstant',
|
||||
'salary'=>'$30,000'
|
||||
]
|
||||
]
|
||||
];
|
||||
return view('jobs', $jobs);
|
||||
);
|
||||
});
|
||||
|
||||
Route::get('/contact', function() {
|
||||
return view('contact');
|
||||
|
|
Loading…
Add table
Reference in a new issue