// SYSTEM PANEL //
[ROOT]
/
mnt
/
pleskStorage
/
vhosts
/
kodsolutions.net
/
subdomains
/
syaaraa.kodsolutions.net
/
app
/
Repositories
[ PARENT ]
EDIT :: PageRepository.php
<?php namespace App\Repositories; use Illuminate\Support\Str; use App\Models\Page; use App\Interfaces\PageRepositoryInterface; class PageRepository implements PageRepositoryInterface { public function getPublishContents($scope, $page=null, $list = 'paginate') { if(isset($scope) && $scope == '') { $data = Page::$scope()->Ordered()->publish(); }else{ $data = Page::Ordered()->publish(); } if ($list == 'list') { $data = $data->take($page)->get(); }elseif ($list == 'first') { $data = $data->first(); } elseif ($list == 'all') { $data = $data->get(); } else { $data = $data->paginate($page); } return $data; } public function getContents($scope){ return Page::publish()->where('slug', $scope)->first(); } }
SAVE
CANCEL