FEATURE #1455: add template path overview

This commit is contained in:
Michal Kváček
2016-02-18 18:19:52 +01:00
parent f3dde68481
commit d082cee7b5
10 changed files with 150 additions and 2 deletions
@@ -0,0 +1,25 @@
<?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use App\Http\Requests;
use App\Models\TemplatePath;
use Illuminate\Http\Request;
class TemplateOverview extends Controller
{
public function getPath($path)
{
$path = TemplatePath::findOrFail($path);
return view('admin.templates.list', [
'directory' => $path,
'isWritable' => is_writable(base_path($path->path)),
'templates' => $path->templates()
->get(),
'subdirectories' => $path->subdirectories()
->get()
]);
}
}