Comments (10)
Are you specifically setting the status column in the seed to 2?
from laravel-boilerplate.
No, actually I don't set the status column at all. Thanks in advance for the help. Do I need to go ahead and set status? Here is what I am doing in the seeder:
'test', 'username' => 'Admin', 'email' => '[email protected]', 'password' => bcrypt('fakepass'), 'confirmation_code' => md5(uniqid(mt_rand(), true)), 'confirmed' => true, 'created_at' => Carbon::now(), 'updated_at' => Carbon::now() ], [ 'name' => 'Default User', 'username' => 'Tester', 'email' => '[email protected]', 'password' => bcrypt('fakepass2'), 'confirmation_code' => md5(uniqid(mt_rand(), true)), 'confirmed' => true, 'created_at' => Carbon::now(), 'updated_at' => Carbon::now() ], ]; DB::table(config('auth.table'))->insert($users); } ``` }from laravel-boilerplate.
The 4th migration setup_access_tables, installs the status column, did you run all of the migrations?
from laravel-boilerplate.
I do indeed have that in my migrations. I did have to modify things as I am using postgres. Here is what I have in that file:
boolean('status')->after('password')->default(true); }); Schema::create(config('access.roles_table'), function ($table) { $table->increments('id')->unsigned(); $table->string('name')->unique(); $table->timestamps(); }); Schema::create(config('access.assigned_roles_table'), function ($table) { $table->increments('id')->unsigned(); $table->integer('user_id')->unsigned(); $table->integer('role_id')->unsigned(); $table->foreign('user_id') ->references('id') ->on(config('auth.table')) ->onUpdate('cascade') ->onDelete('cascade'); $table->foreign('role_id')->references('id')->on(config('access.roles_table')); }); Schema::create(config('access.permissions_table'), function ($table) { $table->increments('id')->unsigned(); $table->string('name')->unique(); $table->string('display_name'); $table->boolean('system')->default(false); $table->timestamps(); }); Schema::create(config('access.permission_role_table'), function ($table) { $table->increments('id')->unsigned(); $table->integer('permission_id')->unsigned(); $table->integer('role_id')->unsigned(); $table->foreign('permission_id') ->references('id') ->on(config('access.permissions_table')); $table->foreign('role_id') ->references('id') ->on(config('access.roles_table')); }); Schema::create(config('access.permission_user_table'), function ($table) { $table->increments('id')->unsigned(); $table->integer('permission_id')->unsigned(); $table->integer('user_id')->unsigned(); $table->foreign('permission_id') ->references('id') ->on(config('access.permissions_table')); $table->foreign('user_id') ->references('id') ->on(config('auth.table')); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table(config('auth.table'), function(Blueprint $table) { $table->dropColumn('status'); }); Schema::table(config('access.assigned_roles_table'), function (Blueprint $table) { $table->dropForeign(config('access.assigned_roles_table').'_user_id_foreign'); $table->dropForeign(config('access.assigned_roles_table').'_role_id_foreign'); }); Schema::table(config('access.permission_role_table'), function (Blueprint $table) { $table->dropForeign(config('access.permission_role_table').'_permission_id_foreign'); $table->dropForeign(config('access.permission_role_table').'_role_id_foreign'); }); Schema::table(config('access.permission_user_table'), function (Blueprint $table) { $table->dropForeign(config('access.permission_user_table').'_permission_id_foreign'); $table->dropForeign(config('access.permission_user_table').'_user_id_foreign'); }); Schema::drop(config('access.assigned_roles_table')); Schema::drop(config('access.permission_role_table')); Schema::drop(config('access.permission_user_table')); Schema::drop(config('access.roles_table')); Schema::drop(config('access.permissions_table')); } ``` }from laravel-boilerplate.
I did find status in the tables, it is set to TRUE for both users.
from laravel-boilerplate.
There should be no reason that message is being thrown while seeding.
from laravel-boilerplate.
I got this issue too when using PostgreSQL, related to
#51
I do comment these statement, because on postgresql these not supported
DB::statement('SET FOREIGN_KEY_CHECKS=0;');
...
DB::statement('SET FOREIGN_KEY_CHECKS=1;');
and
DB:table('table')->truncate( )
in each seed classes
I try this
http://espadav8.co.uk/2015/03/04/laravel-database-seeding-with-postgresql/
but still not solve banned issue
from laravel-boilerplate.
to solved this banned issue on PostgreSQL I change status type to integer instead of boolean
from laravel-boilerplate.
Thanks Azulkipli, I made that change it and worked.
from laravel-boilerplate.
I have fixed all of this with this commit: 57a3603
from laravel-boilerplate.
Related Issues (20)
- I cant send emails to a specific mail.... the mail is going to the smtp website... HOT 1
- Demo asking for password update HOT 2
- Default pages HOT 1
- /lang route will break the session if wrong... HOT 2
- Contact form gcaptcha wrong validate: v6.x HOT 2
- [JS Console Warning] AlphineJS loaded before Livewire scripts. HOT 8
- [Question] Automate generation of localization JSON data(__, @lang in template/classes) HOT 3
- Need to update from Laravel 6 BoilerPlate to Laravel 8 or 9 HOT 2
- I need to disable 2 step authentication HOT 2
- Password expiration middleware to exclude social logins HOT 3
- Argument 1 passed to Illuminate\Session\Middleware\StartSession::addCookieToResponse() must be an instance of Symfony\Component\HttpFoundation\Response, null given, called in /var/www/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php on line 63 {"exception":"[object] (Symfony\\Component\Debug\\Exception\\FatalThrowableError(code:0) HOT 1
- support laravel9? HOT 13
- Can't access the Demo server HOT 1
- Deactivated user can login by requesting password reset HOT 12
- Composer Install Package Issue HOT 2
- I got this error how to solve HOT 1
- Conflict in backend.js causing nav anchor tag to not append to URL HOT 3
- 2FA isn't working HOT 2
- Failed asserting HOT 2
- Demo is broken - Password reset required HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-boilerplate.