kenprogrammer

kenprogrammer

Member Since 3 Weeks Ago

Experience Points
230
Total
Experience

4,770 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
230 XP
Mar
27
1 week ago
Activity icon

Replied to Email Verification For Custom Login

Works now thanks!

Pertaining marking admin accounts as verified,I was considering that but I've almost 400 tenants each with their own separate db thus would force me create a command to update their accounts.

Activity icon

Started a new Conversation Email Verification For Custom Login

In my project the default authentication is used on admin backed. Thus I added another custom login for customers(Frontend) . Here is my problem. I'm trying to implement email verification for customer's account by checking if the email_verified_at is column is empty. I can't use the framework defaults because it'll force admins to verify their emails as well. Customer login has it's own migration similar to the users table.

The problem is the customer is still redirected to their account even if the email verification is empty.

Here is the code:

public function login(Request $request)
    {
        //Validate form
        $this->validate($request,[
            'email'=>'required|email',
            'password'=>'required|min:6'
        ]);

        //Attempt Login
        $credentials=['email'=>$request->email,'password'=>$request->password];
        $remember=$request->remember;

        if(Auth::guard('customer')->attempt($credentials,$remember)){
            /*
            * If email has been verified redirect to customer account
            * otherwise prompt user to verfiy email
            */
            $email_verified_at=Auth::guard('customer')->user()->email_verified_at;
            if(!empty($email_verified_at))
            {
                return redirect('/myaccount');
            }
            return redirect()->back()->withInput($request->only('email','remember'))->with('error','Before proceeding, please check your email for a verification link.');
            
        }
        return redirect()->back()->withInput($request->only('email','remember'))->with('error','Invalid login details!');
    }
Mar
25
1 week ago
Activity icon

Started a new Conversation Extract Exchange Rate From A JSON Object

Below is a curl response from RapidAPI.com

Array ( [Realtime Currency Exchange Rate] => Array ( [1. From_Currency Code] => KES [2. From_Currency Name] => Kenyan Shilling [3. To_Currency Code] => USD [4. To_Currency Name] => United States Dollar [5. Exchange Rate] => 0.00948317 [6. Last Refreshed] => 2020-03-25 10:21:18 [7. Time Zone] => UTC [8. Bid Price] => 0.00947418 [9. Ask Price] => 0.00944733 ) )

Someone help me get extract the exchange rate. I have tried the code below to no avail.

$data = json_decode($response,true);
echo $data['Realtime Currency Exchange Rate']['Exchange Rate'];
Mar
18
2 weeks ago
Activity icon

Started a new Conversation Unable To Install Or Upgrade Symfony Routing Components

I upgraded our site from Laravel 5.7 to 5.8. Installed Spatie and tested. Everythin worked fine on development. After deploying to production (Using git bare repo),artisan and composer commnads aren't working. Whenever i try composer update or install i get the following error:

Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 33 installs, 12 updates, 0 removals
  - Updating symfony/routing (v4.4.4 => v4.4.5):     Update failed (Failed to execute git show-ref --head -d

fatal: not a git repository (or any of the parent directories): .git
)
    Would you like to try reinstalling the package instead [yes]? no

Installation failed, reverting ./composer.json to its original content.


  [RuntimeException]
  Failed to execute git show-ref --head -d

  fatal: not a git repository (or any of the parent directories): .git

See below Laravel exception. I've googling around but nothing helps because i can't execute artisan commands.

 PHP Fatal error:  Uncaught ReflectionException: Class config does not exist in /var/www/project folder

I've removed spatie on development redeployed again but still dies when updating the symfony routing component.

Hint: I've a bash script that deploys when changes are pushed to a designated bare repo. The script puts sites on maintenance executing artisan and composer commands. I can't even perform artisan up or even config:clear directly on the terminal due the class config not found exception. Somebody help me been figting with this since yesterday.

Mar
08
4 weeks ago
Activity icon

Replied to Stripe Key On The View

Ok Thank You

Activity icon

Started a new Conversation Stripe Key On The View

In some tutorials,you'll find that integrating Stripe with Laravel you've to embed on the key on the view. Isn't this risky as someone can view the key by just viewing the page source? See the code below:


<form role="form" action="{{ route('stripe.post') }}" method="post" class="require-validation"
                                                     data-cc-on-file="false"
                                                    data-stripe-publishable-key="pk_test_reFxwbsm9cdCKASdTfxAR"
                                                    id="payment-form">