kenphanith

kenphanith

Member Since 2 Months Ago

Experience Points
200
Total
Experience

4,800 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed
0
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start your engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-in-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

Level 1
200 XP
Aug
21
2 months ago
Activity icon

Replied to How To Get A List Of Files Inside A Zip File ?

@sinnbeck @cjfloss thank you very much for the solution. I can get it done by using ZipArchive appreciate your help

Aug
19
2 months ago
Activity icon

Started a new Conversation How To Get A List Of Files Inside A Zip File ?

Dear great developers, I am new to laravel here, and basically I want to list all the files inside a zip file stored in /storage/app/public/uploads/****.zip. I created a function in my controller

public function files (Request $request) {
     // there is a zip filename in the $request
     $zip = '/storage/app/public/uploads/****.zip';

     // from here I want to get an array of files inside the zip file

     return <array_of_files>
}

Please guide me! 🙏

Aug
14
2 months ago
Activity icon

Replied to How To Get Data From Relation Table In Laravel ?

@michaloravec thank you for your reference. I should have done more research. anyway I mentioned table_a just for question demonstration.

Activity icon

Started a new Conversation How To Get Data From Relation Table In Laravel ?

Basically I have table_a, where table_a has user_id as foreign member.

Schema::create('table_a', function (Blueprint $table) {
      $table->id();
      $table->string('memo');
      $table->unsignedBigInteger('user_id');
      $table->foreign('user_id')
                 ->references('id')
                 ->on('users')
                 ->onDelete('cascade');
      $table->timestamps();
});

** Additional information ** This is my users schema

Schema::create('users', function (Blueprint $table) {
        $table->id();
        $table->string('name');
        $table->string('email')->unique();
        $table->timestamp('email_verified_at')->nullable();
        $table->string('password');
        $table->rememberToken();
        $table->timestamps();
});

and inside my model, I paginate the result as following

$result = DB::table('table_a')->paginate(6);

also inside my TableA model, I defined a relation like this

public function user () {
    return $this->belongsTo(
        User::class
    );
}

The problem is, when I paginate the table_a data, I got user_id as 1 or 2 or 3 when I return it as json response. I am wondering how do I get user data instead of just user-id and return it as json response.

Thank you very much

Aug
06
2 months ago
Activity icon

Replied to Data Truncated When Trying To Create Personal Access Client For Passport

@silencebringer thank you for your answer. that would also do the trick I think

Activity icon

Replied to Data Truncated When Trying To Create Personal Access Client For Passport

@chr15k I changed $table->id() to $table->uuid('id')->primary(); and it works thank you very much for your answer. I appreciate it 💜

Activity icon

Replied to Data Truncated When Trying To Create Personal Access Client For Passport

@chr15k thanks for your reply below is the migration file

$this->schema->create('oauth_clients', function (Blueprint $table) {
            $table->id();
            $table->unsignedBigInteger('user_id')->nullable()->index();
            $table->string('name');
            $table->string('secret', 100)->nullable();
            $table->string('provider')->nullable();
            $table->text('redirect');
            $table->boolean('personal_access_client');
            $table->boolean('password_client');
            $table->boolean('revoked');
            $table->timestamps();
        });

So in stead of using id(), do you think what should I use ? Sorry I am a bit confusing now

Activity icon

Started a new Conversation Data Truncated When Trying To Create Personal Access Client For Passport

Dear great developers, I am new to Laravel and now I am creating an application in Laravel using laravel/passport. I have an issue when trying to create a personal access client. I run php artisan passport:client --personal but I got this following error

SQLSTATE[01000]: Warning: 1265 Data truncated for column 'id' at row 1 (SQL: insert into `oauth_clients` (`user_id`, `name`, `secret`, `provider`, `redirect`, `personal_access_client`, `password_client`, `revoked`, `id`, `updated_at`, `created_at`) values (?, PAC, ed7r2VNqyV7RCW3NZXlkq145jQVe8AwMDPDNDi47, ?, http://localhost, 1, 0, 0, 913a0ac7-5e2b-4d0c-abcd-aa6eb4d52085, 2020-08-07 07:19:09, 2020-08-07 07:19:09))

I've no idea of what's going on behind. please help