• 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
  • Page.php
  • Dan Brown's avatar
    Added page editing · 3c7bd297
    3c7bd297 Browse Files
    Dan Brown authored 2015-07-12 21:31:15 +0100
Page.php 346 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
<?php

namespace Oxbow;

use Illuminate\Database\Eloquent\Model;

class Page extends Model
{
    protected $fillable = ['name', 'html', 'priority'];

    public function book()
    {
        return $this->belongsTo('Oxbow\Book');
    }

    public function getUrl()
    {
        return '/books/' . $this->book->slug . '/' . $this->slug;
    }
}