🎉 Hello world
This commit is contained in:
24
app/Home.php
Normal file
24
app/Home.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class Home extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'title', 'price', 'surface', 'garden_surface', 'rooms', 'energy',
|
||||
'ges', 'description', 'city', 'pictures', 'map', 'url',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'map' => 'array',
|
||||
'pictures' => 'array',
|
||||
];
|
||||
|
||||
public function excerpt()
|
||||
{
|
||||
return Str::words($this->description, 10);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user