codigo actual del servidor, con avances de joan
This commit is contained in:
14
app/Http/Controllers/Api/V2/SubCategoryController.php
Normal file
14
app/Http/Controllers/Api/V2/SubCategoryController.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Api\V2;
|
||||
|
||||
use App\Http\Resources\V2\CategoryCollection;
|
||||
use App\Models\Category;
|
||||
|
||||
class SubCategoryController extends Controller
|
||||
{
|
||||
public function index($id)
|
||||
{
|
||||
return new CategoryCollection(Category::where('parent_id', $id)->get());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user