Created
May 10, 2020 17:35
-
-
Save parzibyte/cd5fa2c3235c3a9e913e64020b399367 to your computer and use it in GitHub Desktop.
This file contains 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; | |
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