FileManager
This commit is contained in:
parent
c8948338bb
commit
f1e0900a7a
131 changed files with 5844 additions and 3081 deletions
|
|
@ -8,10 +8,10 @@ use App\Models\IQContentTree;
|
|||
use App\Models\IQContentTreeNode;
|
||||
use App\Models\TravelGuide;
|
||||
use App\Models\TravelPageGuide;
|
||||
use AppBundle\Util;
|
||||
use Gregwar\Image\Image;
|
||||
use Illuminate\Http\Request;
|
||||
use Input;
|
||||
#use AppBundle\Util;
|
||||
#use Gregwar\Image\Image;
|
||||
use IqContent\LaravelFilemanager\Lfm;
|
||||
use Request;
|
||||
use Validator;
|
||||
|
||||
class CMSTravelGuideController extends Controller
|
||||
|
|
@ -44,7 +44,6 @@ class CMSTravelGuideController extends Controller
|
|||
|
||||
public function page()
|
||||
{
|
||||
|
||||
//make tree
|
||||
$data = [
|
||||
'travel_guide_pages' => TravelPageGuide::getPageGuides(),
|
||||
|
|
@ -56,7 +55,7 @@ class CMSTravelGuideController extends Controller
|
|||
|
||||
public function detail($id)
|
||||
{
|
||||
if($id == "new") {
|
||||
if($id === "new") {
|
||||
$model = new TravelGuide();
|
||||
$id = 'new';
|
||||
$model->active = 1;
|
||||
|
|
@ -65,15 +64,15 @@ class CMSTravelGuideController extends Controller
|
|||
$model = TravelGuide::findOrFail($id);
|
||||
$id = $model->id;
|
||||
}
|
||||
|
||||
if(Input::get('clean') == "true"){
|
||||
if(Request::get('clean') === "true"){
|
||||
$model->full_text = \App\Services\Util::cleanHTML($model->full_text);
|
||||
|
||||
}
|
||||
|
||||
$data = [
|
||||
'response_clean' => Request::get('clean'),
|
||||
'travel_guide' => $model,
|
||||
'id' => $id,
|
||||
'lfm_helper' => app(Lfm::class),
|
||||
];
|
||||
return view('cms.travel_guide.detail', $data);
|
||||
|
||||
|
|
@ -83,7 +82,7 @@ class CMSTravelGuideController extends Controller
|
|||
|
||||
public function pageDetail($id)
|
||||
{
|
||||
if($id == "new") {
|
||||
if($id === "new") {
|
||||
/* $model = new TravelGuide();
|
||||
$id = 'new';
|
||||
$model->active = 1;
|
||||
|
|
@ -104,13 +103,13 @@ class CMSTravelGuideController extends Controller
|
|||
|
||||
public function store($id)
|
||||
{
|
||||
$data = Input::all();
|
||||
$data = Request::all();
|
||||
$data['active'] = isset($data['active']) ? true : false;
|
||||
$data['scope'] = isset($data['scope']) ? true : false;
|
||||
$rules = array(
|
||||
'name' => 'required',
|
||||
);
|
||||
if($id != "new") {
|
||||
if($id !== "new") {
|
||||
$model = TravelGuide::findOrFail($id);
|
||||
|
||||
$rules = array(
|
||||
|
|
@ -121,12 +120,12 @@ class CMSTravelGuideController extends Controller
|
|||
}
|
||||
|
||||
|
||||
$validator = Validator::make(Input::all(), $rules);
|
||||
$validator = Validator::make(Request::all(), $rules);
|
||||
if ($validator->fails()) {
|
||||
return back()->withErrors($validator);
|
||||
}
|
||||
|
||||
if($id == "new") {
|
||||
if($id === "new") {
|
||||
$model = TravelGuide::create($data);
|
||||
}else{
|
||||
$model = TravelGuide::findOrFail($id);
|
||||
|
|
@ -141,14 +140,14 @@ class CMSTravelGuideController extends Controller
|
|||
|
||||
public function pageStore($id)
|
||||
{
|
||||
$data = Input::all();
|
||||
$data = Request::all();
|
||||
$data['status'] = isset($data['status']) ? 1 : 0;
|
||||
$data['show_in_navi'] = isset($data['show_in_navi']) ? 1 : 0;
|
||||
$rules = array(
|
||||
'title' => 'required',
|
||||
);
|
||||
|
||||
if($id != "new") {
|
||||
if($id !== "new") {
|
||||
$model = TravelPageGuide::findOrFail($id);
|
||||
|
||||
$rules = array(
|
||||
|
|
@ -158,12 +157,12 @@ class CMSTravelGuideController extends Controller
|
|||
|
||||
}
|
||||
|
||||
$validator = Validator::make(Input::all(), $rules);
|
||||
$validator = Validator::make(Request::all(), $rules);
|
||||
if ($validator->fails()) {
|
||||
return back()->withErrors($validator);
|
||||
}
|
||||
|
||||
if($id == "new") {
|
||||
if($id === "new") {
|
||||
$model = TravelPageGuide::create($data);
|
||||
}else{
|
||||
$model = TravelPageGuide::findOrFail($id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue