akaunting 3.0 (the last dance)
This commit is contained in:
13
app/Traits/Database.php
Normal file
13
app/Traits/Database.php
Normal file
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace App\Traits;
|
||||
|
||||
trait Database
|
||||
{
|
||||
public function databaseDriverIs(string $driver): bool
|
||||
{
|
||||
$connection = config('database.default');
|
||||
|
||||
return config("database.connections.$connection.driver") === $driver;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user