add shipping rules
This commit is contained in:
@@ -2,23 +2,24 @@
|
||||
|
||||
namespace App\Http\Controllers\Admin\Core;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
use App\Repositories\Core\Comments;
|
||||
use App\Datatables\Admin\Core\CommentsDataTable;
|
||||
use App\Repositories\Core\Comments;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class CommentController extends Controller
|
||||
{
|
||||
public function index($model, $model_id)
|
||||
{
|
||||
$data['comments'] = Comments::getCommentsByModel($model, $model_id);
|
||||
|
||||
return view('Admin.Core.Comments.partials.list-comments', $data);
|
||||
}
|
||||
|
||||
|
||||
public function list(CommentsDataTable $dataTable, $model, $model_id)
|
||||
{
|
||||
$data['model'] = $model;
|
||||
$data['model_id'] = $model_id;
|
||||
|
||||
return $dataTable->render('Admin.Core.Comment.index', $data);
|
||||
}
|
||||
|
||||
@@ -26,6 +27,7 @@ class CommentController extends Controller
|
||||
{
|
||||
$data['comment']['commentable_type'] = $model;
|
||||
$data['comment']['commentable_id'] = $model_id;
|
||||
|
||||
return view('Admin.Core.Comments.partials.modal', $data);
|
||||
}
|
||||
|
||||
@@ -33,6 +35,7 @@ class CommentController extends Controller
|
||||
{
|
||||
$id = $id ? $id : $request->input('id');
|
||||
$data = Comments::get($id);
|
||||
|
||||
return view('Admin.Core.Comments.partials.modal', $data);
|
||||
}
|
||||
|
||||
@@ -40,6 +43,7 @@ class CommentController extends Controller
|
||||
{
|
||||
$data = $request->all();
|
||||
Comments::store($data);
|
||||
|
||||
return response()->json(['error' => 0]);
|
||||
}
|
||||
|
||||
@@ -47,6 +51,7 @@ class CommentController extends Controller
|
||||
{
|
||||
$id = $id ? $id : $request->input('id');
|
||||
Comments::destroy($id);
|
||||
|
||||
return response()->json(['error' => 0]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user