|
@@ -40,12 +40,22 @@ class SliderController extends Controller
|
|
|
public function index(){
|
|
public function index(){
|
|
|
$data = Slider::orderBy('sort','desc')->get();
|
|
$data = Slider::orderBy('sort','desc')->get();
|
|
|
collect($data)->each(function ($item, $key) {
|
|
collect($data)->each(function ($item, $key) {
|
|
|
- // $item->img = Storage::disk('api')->url($item->url);
|
|
|
|
|
|
|
+ //$item->img = Storage::disk('api')->url($item->url);
|
|
|
// $item->img = $item->url;
|
|
// $item->img = $item->url;
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
return showJsonSucc(1001, $data);
|
|
return showJsonSucc(1001, $data);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ public function indexData(){
|
|
|
|
|
+ $data = Slider::orderBy('sort','desc')->get();
|
|
|
|
|
+ collect($data)->each(function ($item, $key) {
|
|
|
|
|
+ $item->img = Storage::disk('api')->url($item->url);
|
|
|
|
|
+ // $item->img = $item->url;
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ return showJsonSucc(1001, $data);
|
|
|
|
|
+ }
|
|
|
//删除轮播图
|
|
//删除轮播图
|
|
|
public function del(Request $request){
|
|
public function del(Request $request){
|
|
|
$validator = \Validator::make($param = $request->all(), [
|
|
$validator = \Validator::make($param = $request->all(), [
|