mariohbrino

mariohbrino

Member Since 1 Year Ago

Experience Points
81,540
Total
Experience

3,460 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
766
Lessons
Completed
Best Reply Awards
6
Best Reply
Awards
  • start-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-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-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist 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 17
81,540 XP
Jan
21
1 month ago
Activity icon

Commented on Tennis Match Kata

I think the method named canBeWon should be named tiebreak.

Also you can add isTied method where there is:

$this->playerOne->points === $this->playerTwo->points
Jan
14
1 month ago
Activity icon

Replied to Api Returns "200 OK" Instead Of "401 Unauthorized"?

Are you using routes/web.php or routes/api.php? Can you please show your route?

Sep
23
5 months ago
Activity icon

Replied to Collection Returning NULL Id's And Dates

@sierravictor that's nice, I didn't notice that on the documentation.

Thanks.

Activity icon

Replied to In Vue How To Get The Child Data Into Parent Component

You can emit events using the .sync modifier convention.

parent

<component
    :prop.sync="prop"
></component>

child

this.$emit('update:prop', newValue);

https://vuejs.org/v2/guide/components-custom-events.html#sync-Modifier

Sep
19
5 months ago
Activity icon

Replied to Best Database Management For Speed

Did you consider to use index in your columns?

Activity icon

Replied to Collection Returning NULL Id's And Dates

You should use eloquent relationships.

In your model Request.php add the relationship frauds

public function frauds()
{
    return $this->hasMany('App\Fraud');
}

In your controller you can do this way

$request = Request::with(['frauds' => function ($query) {
    $query->whereNull('ip');
}])->orderBy('approved', 'asc')->orderBy('created_at', 'desc')->paginate(5);

https://laravel.com/docs/5.8/eloquent-relationships

Sep
09
5 months ago
Activity icon

Replied to Big Project LARAVEL MIX Problem

I think you can add a new file at your resourses/js as admin.js and resources/css as admin.sccs. After you can add in your webpack.

mix.js('resources/js/app.js', 'public/js')
   .js('resources/js/admin.js', 'public/js')
   .sass('resources/sass/app.scss', 'public/css')
   .sass('resources/sass/admin.scss', 'public/css');

So you can import it in you admin panel.

Sep
04
5 months ago
Activity icon

Replied to Slug Route Return 404

See on the documentation route > routing model binding > Customizing The Key Name.

https://laravel.com/docs/6.0/routing#route-model-binding

Add in your model this method.

public function getRouteKeyName()
{
    return 'slug';
}

Your route needs to follow the pattern.

Route::get('/news/{news}', '[email protected]')->name('news.show');

// or to all

Route::resource('/news', 'NewsController');

You don't need the slug in your controller anymore.

public function show(News $news)
{
    return view('news.single', compact('news'));
}
Aug
26
5 months ago
Activity icon

Replied to Queue Jobs With Multiple Threads

@andresayej Thanks. I find out a solution based on your answer.

I can send it to different queues and run multiple workers to execute in different process.

Activity icon

Replied to Duplicate Entry Issue With UpdateOrCreate

How is your validation? Are you validating the slug to check if it's unique?

public function rules ()
{
    'slug' => ['required', 'unique:table,column']
}
Activity icon

Replied to Enable Remote Access To Database Without SSH

The database is in your ec2?

If so you will be able to access the database. Take a look on the link below.

https://vannstudios.com/connecting-mysql-database-engine-on-amazon-ec2-from-mysql-workbench

Activity icon

Started a new Conversation Queue Jobs With Multiple Threads

I have some jobs that the user requests and it will be executed in the queue with a gap of 1.5 seconds between each job.

I need to execute another job every 15 seconds to fetch some notifications in a RESTFUL API of the jobs that the user requested.

Solution I have so far was to add a fetch notification job between every 15 jobs that the user requested.

I would like to execute the fetch notification job as a background without inject it between the user jobs requested. Also it should not delay the jobs that the user requested.

Aug
24
6 months ago
Activity icon

Replied to Laravel Excel

You can import over 1,000 rows with this package, I made over 10,000 rows with this package.

Create the class import to process the csv file

php artisan make:import NameImport

Import class

class NameImport implements ToCollection, WithChunkReading
{
    use Importable;

    public function collection(Collection $collection)
    {
        foreach ($collection as $item) {
            Model::updateOrCreate(
                [
                    // your identifier
                ],
                [
                    // your fields
                ]
            );
        }
    }

    public function chunkSize(): int
    {
        return 1000;
    }
}

Controller

public function upload()
{
    request()->validate([
        'file' => ['required', 'mines:xls,xlsx,csv,txt']
    ]);

    Excel::import(new NameImport(), request()->file('file'));

    return 'file uploaded';
}