View Markdium-Hack.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers\Auth; | |
use App\Http\Controllers\Controller; | |
use App\Providers\RouteServiceProvider; | |
use Illuminate\Support\Facades\Auth; | |
use Illuminate\Http\Request; | |
use Socialite; |
View Markdium-Hack.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// app/Actions/Fortify/UpdateUserProfileInformaiton.php | |
['required', 'email', 'max:255', 'unique:users,email,NULL,id,deleted_at,NULL'], | |
// ... | |
])->validateWithBag('updateProfileInformation'); | |
// ... | |
} | |
// ... | |
} |
View Markdium-Hack.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function up() | |
{ | |
Schema::table('users', function (Blueprint $table) { | |
$table->dropUnique(['email']); | |
$table->string('password')->nullable()->change(); | |
$table->json('social')->nullable(); | |
$table->softDeletes(); | |
$table->unique(['email', 'deleted_at']); | |
}); | |
} |
View Markdium-Shell.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ php artisan migrate |
View Markdium-Hack.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'ses' => [ | |
'key' => env('AWS_ACCESS_KEY_ID'), | |
'secret' => env('AWS_SECRET_ACCESS_KEY'), | |
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), | |
], | |
'facebook' => [ | |
'client_id' => env('FACEBOOK_CLIENT_ID'), | |
'client_secret' => env('FACEBOOK_CLIENT_SECRET'), | |
'redirect' => env('FACEBOOK_CALLBACK_URL'), | |
'scopes' => ['email', 'public_profile'], |
View Markdium-Shell.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ laravel new demo |
View Markdium-Hack.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use App\Http\Controllers\Auth\LoginController; | |
Route::get('/login/{provider}', [LoginController::class, 'redirectToProvider']) | |
->name('social.login'); | |
Route::get('/login/{provider}/callback', [LoginController::class, 'handleProviderCallback']) | |
->name('social.callback'); |
View Markdium-Hack.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Illuminate\Database\Eloquent\SoftDeletes; | |
// ... | |
// If you want to support verify you can add implements | |
class User extends Authenticatable | |
{ | |
use Notifiable; | |
use SoftDeletes; | |
// ... | |
View Markdium-Shell.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ createdb demo |
View Markdium-Shell.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ composer require laravel/jetstream | |
$ php artisan jetstream:install inertia --teams | |
$ npm install && npm run dev | |
# (opt) For customize template you should publish these views | |
$ php artisan vendor:publish --tag=jetstream-views |