wip
This commit is contained in:
@@ -17,7 +17,7 @@ class RedirectIfUserPhoneIsVerfied
|
|||||||
public function handle(Request $request, Closure $next): Response
|
public function handle(Request $request, Closure $next): Response
|
||||||
{
|
{
|
||||||
if (Auth::check() && ! is_null($request->user()?->phone_verified_at)) {
|
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);
|
return $next($request);
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ return new class extends Migration
|
|||||||
|
|
||||||
$table->text('notes')->nullable();
|
$table->text('notes')->nullable();
|
||||||
|
|
||||||
$table->foreignId('user_id')->constrained('users')->restrictOnDelete();
|
$table->foreignId('user_id')->nullable()->constrained('users')->nullOnDelete();
|
||||||
|
|
||||||
$table->boolean('paid')->default(false);
|
$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');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -16,18 +16,6 @@ class FillJsonData extends Seeder
|
|||||||
*/
|
*/
|
||||||
public function run(): void
|
public function run(): void
|
||||||
{
|
{
|
||||||
|
// provinces
|
||||||
}
|
|
||||||
|
|
||||||
public function insertByFiles(): void
|
|
||||||
{
|
|
||||||
$files = glob(database_path('data').'/*');
|
|
||||||
|
|
||||||
foreach ($files as $file) {
|
|
||||||
$table_data = File::json($file);
|
|
||||||
$table_name = Str::afterLast(Str::before($file, '.json'), '/');
|
|
||||||
|
|
||||||
DB::table($table_name)->insert($table_data);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,14 +35,6 @@ class ShieldSeeder extends Seeder
|
|||||||
'name' => 'admin',
|
'name' => 'admin',
|
||||||
'guard_name' => 'web',
|
'guard_name' => 'web',
|
||||||
],
|
],
|
||||||
[
|
|
||||||
'name' => 'operator',
|
|
||||||
'guard_name' => 'web',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'name' => 'currency_maintainer',
|
|
||||||
'guard_name' => 'web',
|
|
||||||
],
|
|
||||||
])->map(fn ($role) => [
|
])->map(fn ($role) => [
|
||||||
...$role,
|
...$role,
|
||||||
'created_at' => now(),
|
'created_at' => now(),
|
||||||
|
|||||||
Reference in New Issue
Block a user