Advertisement
Guest User

Untitled

a guest
Mar 26th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. Schema::create('users', function (Blueprint $table) {
  2. $table->increments('id');
  3. $table->integer('identifier')->unique();
  4. $table->string('username')->unique();
  5. $table->string('name');
  6. $table->string('avatar');
  7. $table->string('trade')->nullable();
  8. $table->decimal('funds')->default(0);
  9. $table->enum('visibility', [1, 2, 3]);
  10. $table->uuid('api_token');
  11. $table->timestamps();
  12. });
  13.  
  14. User::updateOrCreate([
  15. 'identifier' => 'dasdasd',
  16. 'username' => $user->nickname,
  17. 'name' => $user->name,
  18. 'avatar' => $user->avatar,
  19. 'visibility' => $user->visibility,
  20. 'api_token' => Uuid::generate()
  21. ]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement