Issues (13)

src/ServiceProvider.php (1 issue)

Labels
1
<?php
2
3
namespace Fomvasss\LaravelTranslatable;
4
5
use Illuminate\Database\Schema\Blueprint;
6
7
class ServiceProvider extends \Illuminate\Support\ServiceProvider
8
{
9
    /**
10
     * Bootstrap the application services.
11
     *
12
     * @return void
13
     */
14
    public function boot()
15
    {
16
        $this->publishes([
17
            __DIR__ . '/../config/translatable.php' => config_path('translatable.php')
0 ignored issues
show
The function config_path was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

17
            __DIR__ . '/../config/translatable.php' => /** @scrutinizer ignore-call */ config_path('translatable.php')
Loading history...
18
        ], 'config');
19
    }
20
21
    /**
22
     * Register the application services.
23
     *
24
     * @return void
25
     */
26
    public function register()
27
    {
28
        $this->mergeConfigFrom(__DIR__ . '/../config/translatable.php', 'translatable');
29
30
        Blueprint::macro('translatable', function () {
31
            TranslatableColumns::columns($this);
32
        });
33
34
        Blueprint::macro('dropTranslatable', function () {
35
            TranslatableColumns::dropColumns($this);
36
        });
37
38
    }
39
}
40