mirror of https://github.com/4xmen/xshop.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
616 B
PHTML
32 lines
616 B
PHTML
2 weeks ago
|
<?php
|
||
|
|
||
|
namespace App\Http\Controllers\Api;
|
||
|
|
||
|
use App\Http\Controllers\Controller;
|
||
|
use App\Http\Resources\GroupCollection;
|
||
|
use App\Http\Resources\GroupsCollection;
|
||
|
use App\Models\Group;
|
||
|
use Illuminate\Http\Request;
|
||
|
|
||
|
class GroupController extends Controller
|
||
|
{
|
||
|
/**
|
||
|
* Display a listing of the resource.
|
||
|
*/
|
||
|
public function index()
|
||
|
{
|
||
|
//
|
||
|
return GroupsCollection::collection(Group::orderBy('sort', 'asc')->get());
|
||
|
}
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Display the specified resource.
|
||
|
*/
|
||
|
public function show(Group $group)
|
||
|
{
|
||
|
//
|
||
|
return GroupCollection::make($group);
|
||
|
}
|
||
|
}
|