Your ROOT_URL in app.ini is http://167.99.32.63:3000/ but you are visiting http://167.99.32.63/ibrahim/BAGETWEBPANEL/src/commit/5502e10312f1346e86a7121a4cdd08e66c54c696/app/Http/Controllers/Api/V1/Vendor/AttributeController.php You should set ROOT_URL correctly, otherwise the web may not work correctly.
 
 

27 lines
706 B

<?php
namespace App\Http\Controllers\Api\V1\Vendor;
use App\Http\Controllers\Controller;
use App\Models\Attribute;
use Illuminate\Http\Request;
class AttributeController extends Controller
{
function list(Request $request)
{
// $limit = $request['limite']??25;
// $offset = $request['offset']??1;
$attributes = Attribute::orderBy('name')->get();
// ->paginate($limit, ['*'], 'page', $offset);
// $data = [
// 'total_size' => $attributes->total(),
// 'limit' => $limit,
// 'offset' => $offset,
// 'attributes' => $attributes->items()
// ];
return response()->json($attributes,200);
}
}