Skip to content

Commit

Permalink
Fixed routes and added icon pack
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisreedio committed Aug 28, 2023
1 parent 7ad2b40 commit c7640f5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"filament/filament": "^3.0",
"illuminate/contracts": "^10.0",
"laravel/socialite": "^5.8",
"owenvoke/blade-fontawesome": "^2.4",
"spatie/laravel-package-tools": "^1.15.0"
},
"require-dev": {
Expand Down
6 changes: 3 additions & 3 deletions routes/web.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

use ChrisReedIO\Socialment\Controllers\OAuthController;
use ChrisReedIO\Socialment\Controllers\SocialmentController;
use Illuminate\Support\Facades\Route;

// Route::get('/socialment/azure', function () {
// return 'Azure';
// })->name('socialment.azure');

Route::get('/login/{provider}', [OAuthController::class, 'redirect'])->name('socialment.redirect');
Route::get('/login/{provider}/callback', [OAuthController::class, 'callback'])->name('socialment.callback');
Route::get('/login/{provider}', [SocialmentController::class, 'redirect'])->name('socialment.redirect');
Route::get('/login/{provider}/callback', [SocialmentController::class, 'callback'])->name('socialment.callback');
10 changes: 7 additions & 3 deletions src/SocialmentPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Filament\Contracts\Plugin;
use Filament\Panel;
use Filament\Support\Concerns\EvaluatesClosures;
use Illuminate\View\View;
use Illuminate\Support\Facades\View;

class SocialmentPlugin implements Plugin
{
Expand All @@ -23,7 +23,7 @@ public function register(Panel $panel): void
{
$panel->renderHook('panels::auth.login.form.after', function () {
if (! $this->evaluate($this->visible)) {
return '';
return 'NOT VISIBLE';
}

return View::make('socialment::providers-list', [
Expand All @@ -44,7 +44,11 @@ public function boot(Panel $panel): void

public static function make(): static
{
return app(static::class);
$plugin = app(static::class);

$plugin->visible = fn () => true;

return $plugin;
}

public static function get(): static
Expand Down

0 comments on commit c7640f5

Please sign in to comment.