aceraven777

aceraven777

Member Since 4 Years Ago

Experience Points 135,130
Experience Level 28

4,870 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 1334
Lessons
Completed
Best Reply Awards 1
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.

11 Sep
5 days ago

aceraven777 left a reply on Type Error: Argument 2 Passed To Illuminate\Auth\SessionGuard::__construct() Must Implement Interface Illuminate\Contracts\Auth\UserProvider, Null Given, Called In C:\wamp64\www\Login\vendor\laravel\framework\src\Illuminate\Auth\AuthManager.php On Line 12

You may have a typo in your guard user and user-api. You should make their provider users.

        'user' => [
            'driver' => 'session',
            'provider' => 'users',
        ],
        'user-api' => [
            'driver' => 'token',
            'provider' => 'users',
        ],
12 May
1 year ago

aceraven777 left a reply on PayMaya Integration

I created a package for this. Kindly check https://github.com/aceraven777/laravel-paymaya

24 Jul
3 years ago

aceraven777 started a new conversation Service Provider Not Firing

This is a "works in my local but not in production" kind of problem. I have a view composer (Provider) that doesn't seem to fire on production. I littered the file with dd() inside boot(), register(), or immediately after opening the php tag, doesn't do anything. The partial is expecting a view data that's suppose to be supplied by the provider, and it works exactly as advertised on local, but not in production.

Curiously, this only happened from my last 2 attempts. The other view composers still works. I copied one that works, rename the file, the class name, registered it in app/config.php (immediately after the one it was copied from), but nothing.

How do I trace this? I'm using Laravel 5.1.37. Is there a way to manually call the provider from the partial? I really dont want to dump this code unto my controller just to make this work (what I did the first time I encountered it.)

04 Apr
3 years ago

aceraven777 left a reply on Laravel - Bug In Sending Email To Wrong User

Me, Everything now is working fine, I just rebooted my server and the problem is gone. Just as @Sauruz said the problem did exists, dunno what caused it. :|

04 Feb
3 years ago

aceraven777 started a new conversation Laravel - Bug In Sending Email To Wrong User

I'm using laravel 5.1. AWS EC2 service, ubuntu OS.

I've created a command that sends emails to a number of users. Lets say I have this sample code:

    foreach($users as $user) {
        $data = $user->toArray();
        $data['subject'] = "This is subject";
        Mail::queue('emails.email_content', $data, function ($message) use ($data) {
            $message->subject($data['subject']);
            $message->to($data['email']);
        });
    }

In email_content.blade.php lets say I have this code

    Hi {{ $first_name . ' ' . $last_name }}

I used beanstalkd as my queue driver. And use supervisor for monitoring. In my .env file I have this:

    CACHE_DRIVER=file
    SESSION_DRIVER=database
    QUEUE_DRIVER=beanstalkd

But some users are complaining that they're receiving the wrong emails because the name is wrong, sometimes even the subject is wrong. And I'm sure getting the correct $users. What am I doing wrong here? Is it possible that the email are cached or something like that?

09 Jul
4 years ago

aceraven777 started a new conversation Socialite Facebook - How To I Get Other User Data?

I'm using Laravel 5.1, and use socialite to get the facebook user data. But I want to get the User relationships details. I just only get the user basic details. How do I get the other details? Do I have to use a different package such as https://github.com/SammyK/LaravelFacebookSdk?

01 Jul
4 years ago

aceraven777 left a reply on How To Escape Like Query?

Just read the link that @joselara gave me. I have to escape '%' and '_' characters.I revised my code to this:

Products::where('name', 'LIKE', '%' . escape_like($value) . '%')

And I added this function in my helpers.php file:

if (! function_exists('escape_like')) {
    /**
     * @param $string
     * @return mixed
     */
    function escape_like($string)
    {
        $search = array('%', '_');
        $replace   = array('\%', '\_');
        return str_replace($search, $replace, $string);
    }
}

And it's working, let me know if this will have problems in the future?

aceraven777 started a new conversation How To Escape Like Query?

I have a query like this to search for a product name:

Products::where('name', 'LIKE', '%' . $value . '%')

Lets say I want to search for "21% discount". But it treats the percent (%) as a wildcard. How do I escape the '%' in this query?

16 Jun
4 years ago

aceraven777 left a reply on How To Escape Like Query?

@milon Yes I know. I want to escape the percent (%) in the LIKE query for example I want to search for "21% discount", in my current code the % is treated as a wild card, I want to search including the %

aceraven777 left a reply on How To Escape Like Query?

I like to escape the text in the like clause for example. I want to search for $text = "21% discount"

$products = Product::where('name', 'LIKE', '%'.$text.'%')->get();

the % in "21% discount" is treated as a wild card. I want to escape that. Can you give me a function to cleanup data for this?

aceraven777 started a new conversation How To Escape Like Query?

I have a code like this:

$users = User::where('name', 'LIKE', '%'.$name.'%')->get();

I like to escape the like query, is there a laravel method for this or I have to create a separate helper method for this?

24 May
4 years ago

aceraven777 started a new conversation Laravel And PHPSpec Tips

Hi Guys,

I've already watched Jeffrey Way's "Laravel, PHPSpec, and Refactoring" video here: https://laracasts.com/lessons/phpspec-laravel-and-refactoring

My question is when do you use PHPSpec? I understand that PHPSpec is for unit testing. But how do I implement this? What I mean is, once that you've done coding and the tests have passed, how do I use it? Do I copy paste it in the controller? Do I use it (or import it) as a library? Do I use PHPSpec only when there is a very complicated code/logic? Can I use this with eloquent methods?