Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created May 10, 2020 17:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/cd5fa2c3235c3a9e913e64020b399367 to your computer and use it in GitHub Desktop.
Save parzibyte/cd5fa2c3235c3a9e913e64020b399367 to your computer and use it in GitHub Desktop.
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Articulo extends Model
{
protected $table = "articulos";
public function area()
{
return $this->belongsTo("App\Area", "areas_id");
}
public function fotos()
{
return $this->hasMany("App\FotoDeArticulo", "articulos_id");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment