• This project
    • Loading...
  • Sign in

Зуев Егор / wiki.dev

Logo belkanton
Go to a project
Toggle navigation
Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • Snippets
  • Network
  • Create a new issue
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • wiki.dev
  • app
  • Image.php
  • Dan Brown's avatar
    Added created_by and updated_by to entities. Fixes #3 · 52033f3a
    52033f3a
    Dan Brown authored 2015-08-08 21:28:50 +0100
Image.php 398 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
<?php

namespace Oxbow;

use Illuminate\Database\Eloquent\Model;

class Image extends Model
{
    public function getFilePath()
    {
        return storage_path() . $this->url;
    }

    public function createdBy()
    {
        return $this->belongsTo('Oxbow\User', 'created_by');
    }

    public function updatedBy()
    {
        return $this->belongsTo('Oxbow\User', 'updated_by');
    }
}