1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Dyrynda\Database; |
4
|
|
|
|
5
|
|
|
use Illuminate\Database\Connection; |
6
|
|
|
use Illuminate\Support\ServiceProvider; |
7
|
|
|
use Dyrynda\Database\Connection\MySqlConnection; |
8
|
|
|
use Dyrynda\Database\Connection\SQLiteConnection; |
9
|
|
|
use Dyrynda\Database\Connection\PostgresConnection; |
10
|
|
|
|
11
|
|
|
class LaravelEfficientUuidServiceProvider extends ServiceProvider |
12
|
|
|
{ |
13
|
|
|
/** |
14
|
|
|
* Bootstrap any application services. |
15
|
|
|
* |
16
|
|
|
* @return void |
17
|
|
|
*/ |
18
|
|
|
public function boot() |
19
|
|
|
{ |
20
|
|
|
// |
21
|
|
|
} |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* Register any application services. |
25
|
|
|
* |
26
|
|
|
* @return void |
27
|
|
|
*/ |
28
|
|
|
public function register() |
29
|
|
|
{ |
30
|
|
|
Connection::resolverFor('mysql', function ($connection, $database, $prefix, $config) { |
31
|
|
|
return new MySqlConnection($connection, $database, $prefix, $config); |
32
|
|
|
}); |
33
|
|
|
|
34
|
|
|
Connection::resolverFor('postgres', function ($connection, $database, $prefix, $config) { |
35
|
|
|
return new PostgresConnection($connection, $database, $prefix, $config); |
36
|
|
|
}); |
37
|
|
|
|
38
|
|
|
Connection::resolverFor('sqlite', function ($connection, $database, $prefix, $config) { |
39
|
|
|
return new SQLiteConnection($connection, $database, $prefix, $config); |
40
|
|
|
}); |
41
|
|
|
|
42
|
|
|
Blueprint::macro('efficientUuid', function ($column) { |
43
|
|
|
return $this->addColumn('efficientUuid', $column); |
|
|
|
|
44
|
|
|
}); |
45
|
|
|
} |
46
|
|
|
} |
47
|
|
|
|
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.