for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Image extends Model
{
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'url', 'slug', 'post_id', 'filename',
];
public function post()
return $this->belongsTo(Post::class);
}
// @todo
// slug generator
// url generator (could use the URL shortener API)