Skip to content

Commit

Permalink
Обновление SocialServiceProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
Sashagm committed Jul 10, 2023
1 parent 2ce37e9 commit cd0cdb9
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"require": {
"php": "^8.0",
"laravel/framework": "^10.0",
"guzzlehttp/guzzle": "^7.5",
"guzzlehttp/guzzle": "^7.7",
"laravel/socialite": "^5.6"
},
"autoload": {
Expand Down
36 changes: 34 additions & 2 deletions src/Providers/SocialServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,57 @@ public function register(): void
public function boot()
{

$this->loadRoutesFrom(__DIR__ . '/../routes/social.php');
$this->registerRouter();

$this->registerMigrate();

$this->registerLang();

$this->publishFiles();

$this->registerCommands();

$this->loadBlade();
}

protected function registerMigrate()
{
$this->loadMigrationsFrom(__DIR__ . '/../database/migrations');
}

protected function registerRouter()
{
$this->loadRoutesFrom(__DIR__ . '/../routes/social.php');
}

protected function registerLang()
{
$this->loadTranslationsFrom(__DIR__ . '/../resources/lang', 'social-auth');
}

protected function publishFiles()
{
$this->publishes([
__DIR__ . '/../config/socials.php' => config_path('socials.php'),
], 'social-auth');
$this->publishes([
__DIR__ . '/../resources/lang' => resource_path('lang/vendor/socials'),
], 'social-auth');
}

protected function registerCommands()
{
if ($this->app->runningInConsole()) {
$this->commands([
CreateCommand::class,
]);
}
}

protected function loadBlade()
{
$this->blade();

$this->blade_btn();
}

}

0 comments on commit cd0cdb9

Please sign in to comment.