Skip to content

Instantly share code, notes, and snippets.

View agungprsty's full-sized avatar
🌴
On vacation

Agung agungprsty

🌴
On vacation
View GitHub Profile
@agungprsty
agungprsty / README.md
Last active July 8, 2023 07:26
An updated gist description

Hello World Agung Prasetyo

public function run()
{
for ($i=1; $i < 10; $i++) {
User::create([
'name' => "user0$i",
'email' => "user0$i@gmail.com",
'password' => Hash::make('12345678'),
'created_at' => date('Y-m-d H:i:s'),
'updated_at' => date('Y-m-d H:i:s'),
]);
use App\Traits\Uuids;
class User extends Model
{
use Uuids;
/**
* The attributes that are mass assignable.
*
* @var string[]
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->uuid('id')->unique();
$table->string('name');
$table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->rememberToken();
$table->timestamps();
<?php
namespace App\Traits;
use Illuminate\Support\Str;
trait Uuids
{
/**