Created exercises

- Added endpoint to retrieve the list of exercises
This commit is contained in:
2020-04-26 20:33:09 +01:00
parent cfa0c0ab81
commit 8dbdb24ad6
6 changed files with 123 additions and 3 deletions

39
app/Exercise.php Normal file
View File

@@ -0,0 +1,39 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Exercise extends Model
{
/**
* The name of the exercise
* @var string
*/
protected $name;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name'
];
/**
* @return string
*/
public function getName(): string
{
return $this->name;
}
/**
* @param string $name
*/
public function setName(string $name): void
{
$this->name = $name;
}
}