add lots
This commit is contained in:
19
app/ParkingLot.php
Normal file
19
app/ParkingLot.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ParkingLot extends Model
|
||||
{
|
||||
protected $fillable = [ 'firebase_id', 'stall_coordinates', 'reference_image' ];
|
||||
|
||||
public function get_coordinates(){
|
||||
return json_decode( $this->stall_coordinates );
|
||||
}
|
||||
|
||||
public function set_coordinates( $coordinates ){
|
||||
$this->stall_coordinates = json_encode( $coordinates );
|
||||
$this->save();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user