Created
May 4, 2017 08:59
-
-
Save danjohnson95/82cc04497abb2ebba39e0552bde92028 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace App\Models; | |
use Illuminate\Database\Eloquent\Model; | |
use App\Contracts\ProductDataInterface; | |
class Product extends Model implements ProductDataInterface | |
{ | |
protected $table = "products"; | |
/** | |
* Sets the title of the product | |
* @param string $title | |
* @return $this | |
*/ | |
public function setTitle($title) | |
{ | |
$this->title = $title; | |
return $this; | |
} | |
/** | |
* Sets the price of the product | |
* @param float $price | |
* @return $this | |
*/ | |
public function setPrice($price) | |
{ | |
$this->price = $price; | |
return $this; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment