BrainyT

Software Developer at Gbicts Limited

Member Since 3 Months Ago

Kogi

Experience Points
3,830
Total
Experience

1,170 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
26
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.

  • Community Pillar

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

Level 1
3,830 XP
May
10
14 hours ago
Activity icon

Replied to What Could Cause This Migration Error

@tray2 Thanks this work for me.

Activity icon

Started a new Conversation Temporary URL With Data

I want to have a page with a form, and when users fill the form halfway I should be able to generate a temporary URL that expire within a period of time. Then when user make use of the url within the period given, they should still have access to the data they entered before they quit the page.

HOW DO I ACHIEVE THIS IN LARAVEL?

May
03
1 week ago
Activity icon

Replied to What Could Cause This Migration Error

$table->uuid('id)->primary()

Activity icon

Replied to What Could Cause This Migration Error

@tykus Please can you explain further seems not to get your points.

Activity icon

Started a new Conversation What Could Cause This Migration Error

SQLSTATE[HY000]: General error: 1005 Can't create table yourdatabase.vouchers (errno: 150 "Foreign key constraint is incorrectly formed") (SQL: alter table vouchers add constraint vouchers_user_id_foreign foreign key (user_id) references users (id) on delete cascade)

my Schema

   Schema::create('vouchers', function (Blueprint $table) {
        $table->uuid('id')->primary();
        $table->string('voucher');
        $table->string('status')->nullable();
        $table->string('value');
        $table->foreignId('user_id')->nullable()->constrained()->onDelete('cascade');
        $table->timestamps();
    });
Activity icon

Replied to Queue:work On Cpanel

@laracoft after doing this on my project, I don't need to effect any other settings on the Cpanel for option 2?

May
02
1 week ago
Activity icon

Replied to Queue:work On Cpanel

@snapey I will effect this command on Cpanel cron jobs right?

Activity icon

Replied to Queue:work On Cpanel

@snapey So this is all I need to get queue working on my Cpanel?

Activity icon

Replied to Queue:work On Cpanel

@snapey please explain further

Activity icon

Started a new Conversation Eloquent On Model

Controller or Model which is best to put eloquent queries?

Activity icon

Started a new Conversation Queue:work On Cpanel

How to set the queue:work for Laravel application running on Cpanel?

Activity icon

Started a new Conversation UUID

Does using UUID as the primary key have any performance or security impact on applications?

Apr
09
1 month ago
Activity icon

Replied to PhpDesktop Showing Error

@tisuchi Thanks a lot, this information really helped me

Apr
07
1 month ago
Activity icon

Started a new Conversation PhpDesktop Showing Error

Trying to convert my laravel 8 project to a desktop app using phpdesktop, but showing this error

Call to undefined function Illuminate\Encryption\openssl_cipher_iv_length()

What am I doing wrong?

Mar
23
1 month ago
Activity icon

Started a new Conversation How Do I Dynamically Handle Attributes On Spatie Activity Log

Just playing around the Spatie Activity Log package, before implementation on my project, am only logging out the change field which can vary, but the properties->attributes is an object with key-value pair. Since I don't know the field that will be changed in feature, how do I handle this in the frontend, that whichever key changes, I still have it on my frontend

{ "id": 7, "log_name": "default", "description": "updated", "subject_type": "App\Models\User", "subject_id": 24, "causer_type": null, "causer_id": null, "properties": { "attributes": { "name": "Foo", "email": "[email protected]" }, "old": { "name": "Usman", "email": "[email protected]" } }, "created_at": "2021-03-23T15:59:41.000000Z", "updated_at": "2021-03-23T15:59:41.000000Z" },

Activity icon

Replied to Phpdesktop Support PHP 7.4

@martinbean You know when you already build an app for a client, and he introduces that feature

Mar
22
1 month ago
Activity icon

Replied to Phpdesktop Support PHP 7.4

@martinbean The app has already been build with laravel, just looking for a way to make it a standalone on the desktop to look more like a desktop app and users will not need to visit the browser before accessing it.

Mar
15
1 month ago
Activity icon

Awarded Best Reply on Phpdesktop Support PHP 7.4

@trin Meanwhile, can you share more light on why phpdesktop is a bad idea

Activity icon

Replied to Phpdesktop Support PHP 7.4

@trin Meanwhile, can you share more light on why phpdesktop is a bad idea

Activity icon

Replied to Phpdesktop Support PHP 7.4

Any documentation you can point me to explore for the electrons?

Mar
14
1 month ago
Activity icon

Replied to Phpdesktop Support PHP 7.4

That means it cant be used with Laravel 8 since the minimum PHP version required is 7.3

Activity icon

Started a new Conversation Phpdesktop Support PHP 7.4

Does phpdesktop latest version support PHP 7.4?

Mar
11
1 month ago
Mar
10
2 months ago
Activity icon

Replied to Laravel Breeze Reset Password Not Working

Just the UI design but I didn't touch the form and the controller handling the request.

Mar
08
2 months ago
Activity icon

Started a new Conversation Laravel Breeze Reset Password Not Working

Am using laravel breeze, when I make use of the reset password, the password field I reset will change but when I make use of the new password to login, is still does match.

what could I be doing wrong?

Mar
01
2 months ago
Activity icon

Started a new Conversation Laravel Excel Not Working

public function actions(Request $request) { return [ (new DownloadExcel)->withHeadings()->only('if','name', 'Email'), ]; }

The above functions e.g. withHeadings(), only() are not working on my project as started in the document. Please what am I doing wrong?

Activity icon

Replied to How Do I Get My FullName Accessor

@tykus Thank you for this.

Activity icon

Started a new Conversation How Do I Get My FullName Accessor

User::latest()->select(['role', 'email', 'phone'])->get()

When I select some column from the database the FullName accessor will no more be available using the query above.

but when I use this

User::latest()->get()

The FullName accessor becomes available.

Please how do I make it available on the first query

Activity icon

Started a new Conversation How Do I Get My FullName Accessor

User::latest()->select(['role', 'email', 'phone'])->get()

When I select some column from the database the FullName accessor will no more be available using the query above.

but when I use this

User::latest()->get()

The FullName accessor becomes available.

Please how do I make it available on the first query

Feb
27
2 months ago
Activity icon

Replied to Hosting Laravel 8 On Cpanel Shared Hosting

Like what and what Sir?

Activity icon

Replied to How Do I Re-write This With (when) Eloquent Function

I have refactored the one I have in my question and it was working, I tried using the same method for this second one but having an error, please help me look at it and tell where I should make adjustment. Thanks

Activity icon

Replied to Hosting Laravel 8 On Cpanel Shared Hosting

I have tried the methods but still having the same result.

Activity icon

Replied to How Do I Re-write This With (when) Eloquent Function

Thank you so much. perhaps am trying to refactor this code using this method, but hitting error

    if ($this->searchTerm) {
        $searchTerm = '%' . $this->searchTerm . '%';
        $getSales = Shoppingcart::where('trans_code', 'LIKE', $searchTerm)
            ->select('trans_code', 'created_at',  DB::raw("SUM(sub_total) as total"))
            ->groupBy('trans_code')
            ->paginate(10);
    } else {
        $getSales = Shoppingcart::with(['user'])
            ->select('trans_code', 'created_at',  DB::raw("SUM(sub_total) as total"))
            ->groupBy('trans_code')
            ->paginate(10);
    }

Here is what I did

    $searchTerm = "% {$this->searchTerm} %";
    $getSales = Shoppingcart::when(! empty($searchTerm), function ($query) use ($searchTerm) {
        return $query->where('trans_code', 'LIKE', $searchTerm)
            ->select('trans_code', 'created_at',  DB::raw("SUM(sub_total) as total"))
            ->groupBy('trans_code')
            ->paginate(10);
    })->select('trans_code', 'created_at',  DB::raw("SUM(sub_total) as total"))
        ->groupBy('trans_code')
        ->paginate(10);
Activity icon

Started a new Conversation How Do I Re-write This With (when) Eloquent Function

Do I re-write this code with (when) eloquent function and eliminate the if and else on this code

if (empty($this->searchTerm) || $this->searchTerm === 'all') { return $products = Product::all(); } else { $searchResult = '%' . $this->searchTerm . '%'; return $products = Product::where('category_name', 'LIKE', $searchResult) ->orWhere('product_name', 'LIKE', $searchResult) ->orWhere('product_code', 'LIKE', $searchResult) ->get(); }

Feb
26
2 months ago
Activity icon

Started a new Conversation Hosting Laravel 8 On Cpanel Shared Hosting

Trying to host the laravel 8 projects on a subdomain on Cpanel, but every step I tried shows HTTP Error 500 I will be glad if I can be guided through how to make this work.

Feb
21
2 months ago
Feb
15
2 months ago
Activity icon

Started a new Conversation How To Use A Stand-alone Composer Packagist On Laravel

I installed a stand-alone composer package in my laravel project when I use it in my controller

When I instantiate the object and generate the namespace

use EneyeGenerateString\Generate;

$generate = new EneyeGenerateString\Generate(); $result = $generate->generateString(4, '23abc'); dd($result);

Am having this error on the browser

Error Class 'App\Http\Controllers\Auth\EneyeGenerateString\Generate' not found http://127.0.0.1:8000/login

I don't know why is adding App\Http\Controllers\Auth\