17 lines
359 B
PHP
17 lines
359 B
PHP
|
<?php
|
||
|
|
||
|
namespace Modules\Api\Http\Controllers;
|
||
|
|
||
|
use Illuminate\Support\Facades\Response;
|
||
|
use Illuminate\Routing\Controller;
|
||
|
use Modules\Product\Entities\Product;
|
||
|
|
||
|
class ExportProductController extends Controller {
|
||
|
|
||
|
public function __invoke()
|
||
|
{
|
||
|
$products = Product::with('categories')->get();
|
||
|
return response()->json($products);
|
||
|
}
|
||
|
}
|