mesasix

mesasix

Member Since 4 Years Ago

Experience Points 45,490
Experience Level 10

4,510 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 566
Lessons
Completed
Best Reply Awards 0
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.

13 Mar
6 months ago

mesasix started a new conversation Nginx Fastcgi Cache

Hello,

Anyone used fastcgi cache for laravel?

I cant seem to get around the configuration to cache only non authenticated requests since laravel adds the same cookie name for both auth/non auth users.

Any help is greatly appreciated.

Edit: I can add a custom cookie with arbitrary value that determines authenticated user using a response/after middle-ware and read it from nginx but it seems like a far fetched solution. Im wondering if there is a more elegant solution.

03 Jan
8 months ago

mesasix left a reply on Laravel Passport, Password Grant, Illuminate UserProvider And OAuth2 UserRepository

hi @erdemkeren

I stumbled into this and what we did was implement the validateForPassportPasswordGrant method on the User class.

Then you can do all sorts of things on that particular method. maybe doing api request? contacting LDAP server? anything you can think of.

Hope this helps.

04 Mar
1 year ago

mesasix started a new conversation Access Route Parameters From Global Middleware

Hi,

I can't seem to access the value of the route parameters inside a global middleware.

I tried the following but to no avail:

$request->route('param_name'); $request->param_name; $request->route()->parameters(); $request->route()->parameter('param_name);

Thanks!

23 Feb
1 year ago

mesasix left a reply on Testing Mailables Attachment

Thanks @Borisu

That's what I thought too but the mailable class would return a "file do not exist" error.

I may have missed something.

Will update this post!

mesasix started a new conversation Testing Mailables Attachment

Hi,

How do we test Mailables' attachments?

We have Mail::fake and Storage::fake helpers but I can't seem to figure out how to mock the storage functions inside a Mailable class.

Thanks!

23 Oct
2 years ago

mesasix started a new conversation Caching Dyanamic Results Page

So here is the scenario we have an application that has a search functionality with keyword and location what we want to achieve basically is create a static page for each result for SEO so # of keywords * # of locations = # results page something link that. Our idea is something like this use the cache

Cache::remember($request->q.$request->l,time, function() use ($data) {
    return view('viewname', compact('data'))->render();
})

First concern is it will cache every combination which means the every first request loads longer. Second is that the data in the cached view will not be updated unless it expires and the query needs to be executed again.

can you guys suggest a better idea?

13 Jul
3 years ago

mesasix left a reply on Elasticsearch - Homestead Port Forwarding Issue

@AQ thanks fixes my issue! :)

11 Feb
3 years ago

mesasix left a reply on Laravel 5.1 - Jwt.auth - Empty Authorization Header

@gabbe i just want to know how you store the token into localStorage after you have authenticate the user.. im really stuck on storing the token to local storage after i create the token as $token = JWTAuth::fromUser($user); where $user is an eloquent model. im also using the tymondesign jwt-auth 0.5*

17 Sep
4 years ago

mesasix left a reply on Database Migrations In Lumen With Multiple Database Connections

hi @bobbybouwmann, thanks for taking time to look into this.

yeah i already tried

php artisan migrate --database=local

but still gives me the same sets of errors above. I even restarted homestead and re-provision homestead.

As you can see on the error, it tries to create a table with empty name. I guess this has something to do with multiple database connections with lumen.

Weird thing though is that when I deleted the config/database.php file, I can run all my migrations using the default DB connections on .env file.

mesasix left a reply on Database Migrations In Lumen With Multiple Database Connections

thanks for the reply @bobbybouwmann

i dont have any migrations yet. the command:

php artisan migrate:install --database=local

simply tries to create a new migration database table and it failed already.

So I cant proceed in creating the migrations for my tables.

16 Sep
4 years ago

mesasix started a new conversation Database Migrations In Lumen With Multiple Database Connections

So i setup multiple database connections in config/database.php:

return [
    'default' => 'trd_admin',

    'connections' => [
        'trd_admin' => [
            'driver'    => env('DB_CONNECTION'),
            'host'      => env('DB_HOST'),
            'port'      => env('DB_PORT'),
            'database'  => env('DB_DATABASE'),
            'username'  => env('DB_USERNAME'),
            'password'  => env('DB_PASSWORD'),
            'charset'   => 'utf8',
            'collation' => 'utf8_unicode_ci',
            'prefix'    => '',
            'strict'    => false
        ],

        'local' => [
            'driver'    => env('LOCAL_CONNECTION'),
            'host'      => env('LOCAL_HOST'),
            'port'      => env('LOCAL_PORT'),
            'database'  => env('LOCAL_DATABASE'),
            'username'  => env('LOCAL_USERNAME'),
            'password'  => env('LOCAL_PASSWORD'),
            'charset'   => 'utf8',
            'collation' => 'utf8_unicode_ci',
            'prefix'    => '',
            'strict'    => false
        ]
    ]
];

and when I run:

php artisan migrate:install --database=local

it gives me this errors:

[Illuminate\Database\QueryException]                                         
SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name '' (SQL: create table `` (`migration` varchar(255) not null, `batch` int not null) default character set utf8 collate utf8_unicode_ci)  
[PDOException]                                                               
SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name '' 

Thanks for your reply.