FEATURE #1455: add template path overview
This commit is contained in:
@@ -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()
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user