wip
This commit is contained in:
@@ -17,7 +17,7 @@ class RedirectIfUserPhoneIsVerfied
|
||||
public function handle(Request $request, Closure $next): Response
|
||||
{
|
||||
if (Auth::check() && ! is_null($request->user()?->phone_verified_at)) {
|
||||
return redirect()->route(config()->string('module.base-auth.redirect_path'));
|
||||
return redirect(config()->string('module.base-auth.redirect_path'));
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
|
||||
@@ -53,7 +53,7 @@ return new class extends Migration
|
||||
|
||||
$table->text('notes')->nullable();
|
||||
|
||||
$table->foreignId('user_id')->constrained('users')->restrictOnDelete();
|
||||
$table->foreignId('user_id')->nullable()->constrained('users')->nullOnDelete();
|
||||
|
||||
$table->boolean('paid')->default(false);
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->boolean('active')->default(true);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->dropColumn('active');
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user