1. Go to this page and download the library: Download chrisreedio/socialment library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
chrisreedio / socialment example snippets
$panel
->plugins([
// ... Other Plugins
\ChrisReedIO\Socialment\SocialmentPlugin::make(),
])
return [
'providers' => [
'azure' => [
'icon' => 'fab-microsoft', // Font Awesome Brand Icon
'label' => 'Azure', // Display Name on the Login Page
]
],
// ... Other Configuration Parameters
];
$panel->plugins([
\ChrisReedIO\Socialment\SocialmentPlugin::make()
->registerProvider('azure', 'fab-microsoft', 'Azure Active Directory'),
]);
return [
'view' => [
// Set the text above the provider list
'prompt' => 'Or Login Via',
// Or change out the view completely with your own
'providers-list' => 'socialment::providers-list',
],
// DEPRECATED: This will be removed in a future version.
// Configure routes via the panel provider.
'routes' => [
'home' => 'filament.admin.pages.dashboard',
],
'models' => [
// If you want to use a custom user model, you can specify it here.
'user' => \App\Models\User::class,
],
// DEPRECATED: This will be removed in a future version.
// Configure providers via the panel provider.
'providers' => [
'azure' => [
'icon' => 'fab-microsoft',
'label' => 'Azure Active Directory',
]
],
];
// In this example, we pass 'dashboard' as the SPA route name.
// We'll want to make sure the 'prefix' our custom routes match.
// If no prefix is set/passed to spaAuth, the default is 'spa'.
Route::spaAuth('dashboard');
Route::middleware('auth:sanctum')
->prefix('dashboard')
->as('dashboard.')
->group(function () {
// Custom Routes
});
'paths' => [
// ... Other Paths
'spa/*', // OR use the custom prefix you set in the routes/web file.
],
'supports_credentials' => true,
bash
php artisan socialment:install
js
content: [
"./app/Filament/**/*.php",
"./resources/views/filament/**/*.blade.php",
"./vendor/filament/**/*.blade.php",
// ... Other Content Paths
// Ensure the line below is listed!!!
"./vendor/chrisreedio/socialment/resources/**/*.blade.php",
],