tailflow / laravel-orion

The simplest way to create REST API with Laravel
https://orion.tailflow.org
MIT License
1.44k stars 87 forks source link

Customize Database Driver #243

Open gogl92 opened 4 months ago

gogl92 commented 4 months ago

As a developer I'd like to be able to modify certain classes so I can use different data sources like NoSQL databases and other database engines.

Driver and/or standard classes should be configurable, like

return [
    'namespaces' => [
        'models' => 'App\\Models\\',
        'controllers' => 'App\\Http\\Controllers\\',
        'drivers' => 'App\\Drivers\\' \\ Orion\\Drivers by default
    ],
    'driver' => 'mongodb', //standard by default
    'auth' => [
        'guard' => 'api',
    ],
   ...
];

This will help to override methods that have SQL specific keywords like applySearchingToQuery

May fix https://github.com/tailflow/laravel-orion/issues/228

alexzarbn commented 3 months ago

Hi @gogl92,

Thank you for raising the issue. Sounds quite useful - I will leave the issue open to see if there is further interest in this.