PHP code example of omerkoseoglu / devextreme-data-laravel
1. Go to this page and download the library: Download omerkoseoglu/devextreme-data-laravel library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
omerkoseoglu / devextreme-data-laravel example snippets
use DevExtreme\Data\Laravel\Facades\DevExtreme;
Route::get('/api/orders', fn () => DevExtreme::response(Order::class));
// any builder, relation or constraint
Route::get('/api/my-orders', fn (Request $r) =>
DevExtreme::response($r->user()->orders()->where('status', 'open'))
);