ekpono

ekpono

Member Since 9 Months Ago

Lagos

Web Developer at Sophtcode

Experience Points 28,240
Experience Level 6

1,760 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 264
Lessons
Completed
Best Reply Awards 1
Best Reply
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

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

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

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

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    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 Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

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

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

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

23 Jun
3 days ago

ekpono started a new conversation Add Varieties To A Single Product

I am building an e-store, that different vendors will update varieties of a single product to the database. How will I structure my database (products table) to take care of this.

Any opinion will be really appreciated

ekpono left a reply on Vue V-model Not Responsive

The el: #hidable does not have closing single quote

    el:'#hidable,
    data: {
            traffic:'all'
        }
})```

Change it to 

var one = new Vue({ el:'#hidable', data: { traffic:'all' } })

14 Jun
1 week ago

ekpono left a reply on Nova Resource From API Data

I have successfully implemented this. I created a new connection and pointed the model to that connection, which is another database.

return array(

    'default' => 'mysql',

    'connections' => array(

        # Primary/Default database connection
        'mysql' => array(
            'driver'    => 'mysql',
            'host'      => '127.0.0.1',
            'database'  => 'database1',
            'username'  => 'root',
            'password'  => 'secret'
            'charset'   => 'utf8',
            'collation' => 'utf8_unicode_ci',
            'prefix'    => '',
        ),

        # Secondary database connection
        'mysql2' => array(
            'driver'    => 'mysql',
            'host'      => '127.0.0.1',
            'database'  => 'database2',
            'username'  => 'root',
            'password'  => 'secret'
            'charset'   => 'utf8',
            'collation' => 'utf8_unicode_ci',
            'prefix'    => '',
        ),
    ),
);

On the model, I used class SomeModel extends Eloquent {

protected $connection = 'mysql2';

}

ekpono left a reply on Nova Table To Call An Endpoint Instead Of User Model

I have successfully implemented this feature. I created a new connection and pointed the model to that connection, which is another database

ekpono left a reply on Nova Table To Call An Endpoint Instead Of User Model

@bobbybouwmann thanks for your reply.

Since I have the table in another database, I want to use a different connection on the model to fetch the data from it. Hope this is a good approach. Also, how might I achieve this?

ekpono left a reply on Nova Resource From API Data

This is sad. Seems I will have to use custom admin panel

ekpono left a reply on Nova Resource From API Data

I have this same question too. Please were you able to resolve it? @simber

ekpono started a new conversation Nova Table To Call An Endpoint Instead Of User Model

I have an application I am building, it is using nova. I have an ApiUsers that is another laravel application users table. Since I am not using User model on the app. How do I go about implementing this

17 May
1 month ago

ekpono left a reply on Laravel

interested on codecourse.com. [email protected] thanks

25 Apr
2 months ago

ekpono left a reply on Want To Implement Payment Gateway Into The Api .

I'd advice you use a payment package to make your work a lot easier. You can try https://github.com/lubusIN/laravel-mojo Let me know if you need any help

ekpono left a reply on Axios.get(): Not Allowed By Access-Control-Allow-Headers.

I was stuck at this for hours. So I decided to do it the old fashion way with jquery let url = 'the_end_point'

                    url: "url",
                    type: 'GET',
                    dataType: 'json', // added data type
                    success: (res) => {
                        this.states = res;
                    }
                });

And it workds

23 Mar
3 months ago

ekpono started a new conversation Git Autodeploy Laravel Project On Sharehosting On Namecheap

Hi guys, am having a bit of hard time setting up Autodeploy on my hosting. Please any suggestions, link or materials will be very appreciated

06 Mar
3 months ago

ekpono left a reply on Syntax Error, Unexpected ';', Expecting ',' Or ')'

As @hslavov said you have opened bracket <form action="{{route('updatelisting', $listing->id}}" method="POST"> but u forgot to close Update it to <form action="{{route('updatelisting', $listing->id}})" method="POST">

ekpono left a reply on ID Column In PostgreSQL (Laravel 5.8)

I think you should change the id field in your database from 'increments' to string.

ekpono left a reply on Where Are You All From?

Lagos, Nigeria

21 Feb
4 months ago

ekpono left a reply on Laravel Mail Does Not Send To Mailtrap

Check your log for the error message and also make sure u have internet connection

10 Feb
4 months ago

ekpono started a new conversation Attaching Multiple Image To Form

I have a table that contains an image to be uploaded. obviously, it is only the url that is to be stored in the database while the main image will be sent to amazon s3. The issue is only one image is sent, so am guessing there is a mistake in my loop. saveVendor() { this.isLoading = true; let data = { items: this.vendorTableRows, }; for (let i = 0; i < data.items.length; i++) { let handle = document.querySelector('.image').files[i]; let formData = new FormData(); formData.append('file', handle); axios.post('/client/vendor/uploadVendorImage', formData).then(res => { this.vendorTableRows.image = res.data.data }); }

ekpono left a reply on [ELOQUENT] Ordering Users By Last Name On 'name' Column

if you need further explanation let me know. the delimiter will be space " ".

ekpono left a reply on [ELOQUENT] Ordering Users By Last Name On 'name' Column

use explode function $arr=array ('I','am','simple','boy!'); echo implode(" ",$arr); ?>

25 Jan
5 months ago

ekpono left a reply on SQLSTATE[23000]: Integrity Constraint Violation: 1452 Cannot Add Or Update A Child Row: A Foreign Key Constraint Fails

I had the same issue,

dd() die dump the returned value, you will notice that a new row was not inserted because the unique id wasn't created. That's why you see something like Cannot add or update a child row: a foreign key constraint fails child row.

make sure you look at the result of die die very well

06 Nov
7 months ago

ekpono left a reply on Laravel Global Helper Functions Not Working

Let's see where you are making the call and what you are trying to achieve

ekpono left a reply on Laravel Job Is In The Jobs Table But Not Dispatching

The job in the console is only processing not processed and dispatched. what am i doing wrong?

ekpono left a reply on Laravel Job Is In The Jobs Table But Not Dispatching

yes. I have done php artisan queue:work and php artisan queue:listen It is still not dispatching the job

05 Nov
7 months ago

ekpono started a new conversation Laravel Job Is In The Jobs Table But Not Dispatching

The job is in my jobs table but it is not sending the mail

    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

    /**
     * Create a new job instance.
     *
     * @return void
     */
    public function __construct()
    {
        //
    }

    /**
     * Execute the job.
     *
     * @return void
     */
    public function handle()
    {

        Mail::to($user->email)->send(new VerifyMail($user));
    }
20 Oct
8 months ago

ekpono started a new conversation How To Exit Out Of Saving A Record If A Condition Is Not True

I want to save a record in my table but i have set a condition that must be met before it is saved. I don't know if this is the best approach.

 public function transaction($data, $loanTransaction)
    {
        $loanTransaction = find($data['loan_id']);
        $loanTransaction = new LoanTransaction;
        $loanTransaction->decrement($loanTransaction['duration']);

        if(! $loanTransaction['amount'] === $loanTransaction->amount){
            die          
        }

        $loanTransaction->paid_date = $loanTransaction['paid_date'];
        $loanTransaction->payment_method = $loanTransaction['payment_method'];
        $loanTransaction->bank_name = $loanTransaction['bank_account_id'];
        $loanTransaction->save();

        return true;
    }

I want to make sure the amount entered is the save with the one in the database before saving. Am i to die or return false please which approach is the best way to go.

ekpono left a reply on I Want To Build A Loan Feature In Laravel Project. How Do I Keep Track On Updated Input

Yes.. it is a hasMany relationship. Thank you so much.

ekpono left a reply on I Want To Build A Loan Feature In Laravel Project. How Do I Keep Track On Updated Input

Like so?

    public function getBalanceAttribute()
    {
        return $this->loanHistory->sum('amount');
    }

Loan loanHistory is the relationship Since the query is running through relationship it should always be updated. so no need inject now() in the Accessor? I guess

ekpono left a reply on I Want To Build A Loan Feature In Laravel Project. How Do I Keep Track On Updated Input

@Dalma Thank you so much for your contributions. Can i have a resources i can go through but so far i have an idea on how to get through to it. A guide would help too

ekpono left a reply on I Want To Build A Loan Feature In Laravel Project. How Do I Keep Track On Updated Input

ok. Since the history is where all the financial information is. All payments/transactions should be posted to LoanHistory model then?

ekpono left a reply on I Want To Build A Loan Feature In Laravel Project. How Do I Keep Track On Updated Input

create an entry in this table when the loan record is created. I don't quite understand the entry part? :(

ekpono left a reply on I Want To Build A Loan Feature In Laravel Project. How Do I Keep Track On Updated Input

Please how will the logic in my controller look like? Or am i to save and update only histories table?

ekpono left a reply on Call To Undefined Method

It is your port 8080 or any other port you are using that is missing.

Your url is this http://localhost/password/reset/6a863bf328d6450a8c9bfa167b2091ae1bf80c468a97b3a04f636b8c918faae1

instead of this http://localhost:8080/password/reset/6a863bf328d6450a8c9bfa167b2091ae1bf80c468a97b3a04f636b8c918faae1

ekpono left a reply on I Want To Build A Loan Feature In Laravel Project. How Do I Keep Track On Updated Input

Here's my table structure

        Schema::create('loans', function (Blueprint $table) {
            $table->string('id');
            $table->string('company_id')->index();
            $table->string('name');
            $table->datetime('start_date');
            $table->datetime('end_date');
            $table->string('duration');
            $table->double('amount')->default(4, 7);
            $table->string('purpose');
            $table->enum('isActive');
            $table->timestamps();
        });

        Schema::create('loan_histories', function (Blueprint $table) {
            $table->string('id');
            $table->string('loan_id')->index();
            $table->integer('duration');
            $table->double('amount_paid')->default(4, 7);
            $table->datetime('paid_date');
            $table->double('remaining_balance')->default(4, 7);
            $table->string('payment_method');
            $table->string('bank_name');
            $table->timestamps();
        });
    }

ekpono started a new conversation I Want To Build A Loan Feature In Laravel Project. How Do I Keep Track On Updated Input

Let's say a user collected $2,000 loan. At the end of the month, the user pays $200 in first month and another $200 the second month. Now, i have history table that will keep track of each transaction and record it. The issue am facing is how do i work out the logic in keeping the history updated when a deduction is made on the loan table. Please any suggestion will go a long way. Thanks

18 Oct
8 months ago

ekpono left a reply on Installation Problem

5.7 is the latest version. @Snapey funny question

ekpono left a reply on Eloquent Query Picking Wrong Database For The User Model

If the model is pointing to the wrong table you can use this in your table model protected $table = 'name_of_the_table'

12 Oct
8 months ago

ekpono left a reply on Connection Could Not Be Established With Host Smtp.mailtrap.io [Connection Refused #111]

I talked to namecheap support, they gave me working port. @Cronix @D9705996 Thanks so much guyz. With selfless people like you guyz, i can build anything. It makes me want to give more to the community

11 Oct
8 months ago

ekpono left a reply on Connection Could Not Be Established With Host Smtp.mailtrap.io [Connection Refused #111]

yes .. it supposed to be sent via phone. But am not getting the code.

ekpono left a reply on Connection Could Not Be Established With Host Smtp.mailtrap.io [Connection Refused #111]

Though the mailgun account is not verified Am still getting this when verifying

An error occurred while attempting to send your verification code, please try again. Contact Support if the issue persists.

ekpono left a reply on Connection Could Not Be Established With Host Smtp.mailtrap.io [Connection Refused #111]

Have switch to mailgun

λ nmap -Pn -pT:25 smtp.mailgun.org
Starting Nmap 7.70 ( https://nmap.org ) at 2018-10-11 23:42 W. Central Africa Standard Time
Stats: 0:00:06 elapsed; 0 hosts completed (0 up), 0 undergoing Host Discovery
Parallel DNS resolution of 1 host. Timing: About 0.00% done
Nmap scan report for smtp.mailgun.org (35.161.201.187)
Host is up (0.45s latency).
Other addresses for smtp.mailgun.org (not scanned): 52.26.154.214
rDNS record for 35.161.201.187: ec2-35-161-201-187.us-west-2.compute.amazonaws.com

PORT   STATE SERVICE
25/tcp open  smtp

Nmap done: 1 IP address (1 host up) scanned in 8.14 seconds

ekpono left a reply on Connection Could Not Be Established With Host Smtp.mailtrap.io [Connection Refused #111]

i have ssh into my server and perform the same command but am getting -bash error

ekpono left a reply on Connection Could Not Be Established With Host Smtp.mailtrap.io [Connection Refused #111]

i'm getting this

 nmap -Pn -pT:2525 smtp.mailtrap.io
Starting Nmap 7.70 ( https://nmap.org ) at 2018-10-11 23:32 W. Central Africa Standard Time
Nmap scan report for smtp.mailtrap.io (34.194.188.188)
Host is up (0.19s latency).
Other addresses for smtp.mailtrap.io (not scanned): 34.199.205.108 52.203.151.210
rDNS record for 34.194.188.188: ec2-34-194-188-188.compute-1.amazonaws.com

PORT     STATE SERVICE
2525/tcp open  ms-v-worlds

Nmap done: 1 IP address (1 host up) scanned in 7.63 seconds

ekpono left a reply on Connection Could Not Be Established With Host Smtp.mailtrap.io [Connection Refused #111]

:( :( I'm getting this

 nmap -Pn -pT:2525 stmp.mailtrap.io
Starting Nmap 7.70 ( https://nmap.org ) at 2018-10-11 23:30 W. Central Africa Standard Time
Failed to resolve "stmp.mailtrap.io".
WARNING: No targets were specified, so 0 hosts scanned.
Nmap done: 0 IP addresses (0 hosts up) scanned in 1.16 seconds

ekpono left a reply on Connection Could Not Be Established With Host Smtp.mailtrap.io [Connection Refused #111]

@D9705996 thanks so much for your reply. I have hosted the site on namecheap. I want it that when a user signsup on the platform I will get a notification to follow up the user base on the information given to me on the platform. I am using mailtrap (though i have tried mailgun, gmail and still getting the same error) so i can get the email. I also intend to automatically forward the mail to [email protected]