sr57

Member Since 5 Months Ago

Experience Points
65,210
Total
Experience

4,790 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
140
Lessons
Completed
Best Reply Awards
58
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 14
65,210 XP
Apr
12
1 day ago
Activity icon

Replied to Npm Run Build Not Found

We got the st else :-)

npm install videojs-youtube OR ...

nmp install is enough to install the package

Activity icon

Replied to Npm Run Build Not Found

The question is "Why do you run this command?" - communication is always a dificult art :-)

Activity icon

Replied to Npm Run Build Not Found

We come back to the beginning , you don't have build, ... don't add it.

You never answer where do u read to run this cde? (as @phillipkregg wrote It should be linked to st else)

Activity icon

Replied to Npm Run Build Not Found

What's the command you did?

Activity icon

Replied to Npm Run Build Not Found

I don't work with Laragon but I suppose it does not change the way of installing package ...

Activity icon

Replied to Npm Run Build Not Found

Following the doc https://videojs.com/getting-started/

you should install by : npm install --save-dev video.js

Did you do this ?

Where do you see to run npm run build?

Activity icon

Replied to Npm Run Build Not Found

If you don't have the build script you should not need it.

What package did you installed taht ask u run this cde?

Maybe npm audit or doctor can give you some trick if st worked false before ...

Activity icon

Replied to Redirect To The Same Page To An Section ID

Nothing (no redirect) to code

https://laravel.com/docs/8.x/validation#introduction

As you can see, the validation rules are passed into the validate method. Don't worry - all available validation rules are documented. Again, if the validation fails, the proper response will automatically be generated. If the validation passes, our controller will continue executing normally.

Activity icon

Awarded Best Reply on A Problem Again With Count And Group By

is there another way not to have to do this with the strict mode ?

Strick mode in mysql is a way to have it better conform with sql standard like postgresql for instance. So, it's a good thing to learn how to write query in strict mode.

That said, you have to know that if you use 'GROUP BY' the fields in the select MUST BE only fields grouped or fields in an aggregate function (AVG, MIN, ...)

It's pure logic, imagine you have a data table with day and sunset per day. If you group your data per month, you can no more get the sunset for a specific day but you can calculate the average sunset per month.

And if you want the sunset of all the days and the average per month, yous just have to join the 2 queries.

Hope my exemple is enough clear.

In non strict mode, mysql try to overcome this logic but the result is not always what you expect :-)

Activity icon

Replied to A Problem Again With Count And Group By

is there another way not to have to do this with the strict mode ?

Strick mode in mysql is a way to have it better conform with sql standard like postgresql for instance. So, it's a good thing to learn how to write query in strict mode.

That said, you have to know that if you use 'GROUP BY' the fields in the select MUST BE only fields grouped or fields in an aggregate function (AVG, MIN, ...)

It's pure logic, imagine you have a data table with day and sunset per day. If you group your data per month, you can no more get the sunset for a specific day but you can calculate the average sunset per month.

And if you want the sunset of all the days and the average per month, yous just have to join the 2 queries.

Hope my exemple is enough clear.

In non strict mode, mysql try to overcome this logic but the result is not always what you expect :-)

Activity icon

Replied to Add Laravel Breeze To Exisitng Project

Breeze on existing project

Non sense.

2nd time, Breeze is a starter kit, that's all, and that's great like this.

In my opinion, it'll be quicker to rename some views from your previous code than to try to adapt st undocumented. Even if you succeed the way of you want to do, that's be no valuable for others since it depends from your starting point ...

Activity icon

Replied to Add Laravel Breeze To Exisitng Project

@ahangarha

Breeze is a starter kit, the (only) and good way to do what your want is to :

  • start a fresh project with Breeze

  • copy your previuous codes (migrations, views, ...) and adjust your routes (web.php, ...)

Activity icon

Replied to Ntimyeboah/laravel-database-trigger Incompatible

Hi @marco_1992

I did a fresh new laravel 8 installation

Ok

add the lines in my composer.json file

Please share your exact composer.json , the command you did and the error you got.

Activity icon

Replied to Laravel Breeze Or Laravel Jetstream Or Manual Authentication?

Yes, Breeze is enough (for beginning) and very easy to setup.

Activity icon

Replied to Ntimyeboah/laravel-database-trigger Incompatible

@neilstee

Whaoh !!!! comminication is always a difficult art ...

I'll wrote to be kind with you, to thank yo and it seems I hurt you ... APPOLOGIES ... english is not my mother language.

But thanks, I'll be more "aware" to the question next time

You answer to the question this time too, I never wrote or want to write other thing.

Do you want me to erase my post?

Activity icon

Replied to Laravel Breeze Or Laravel Jetstream Or Manual Authentication?

Up to you, it's just because Laravel keeps moving , jetstream & breeze come 'recentlly'.

If you begin, I suggest you Laravel Breeze,

Choose Jetstream if you want more options to auth but that's means and woorking with livewire/blade or inertiavue.js

Activity icon

Replied to Ntimyeboah/laravel-database-trigger Incompatible

Hi @neilstee

I've noticed that this time you're getting a little off track, but you're doing a good job overall. Have a day and thanks for your helps to the community.

Apr
11
2 days ago
Activity icon

Replied to Ntimyeboah/laravel-database-trigger Incompatible

your migration

up()
  DB::statement("CREATE TRIGGER your_tg_name ...
  ...


down()
  DB::statement("DROP TRIGGER your_tg_name
....

https://mariadb.com/kb/en/create-trigger/

Activity icon

Replied to Using Datatables To Display Json Data?

$query = DB::table('transactions')
                        ->select('invoice_no as invoice_no')
                        ->get();


    return Datatables::of($query)
    ->editColumn('invoice_no', function ($row) {
         return $row->invoice_no;
     })
	->make(true);
Activity icon

Replied to Ntimyeboah/laravel-database-trigger Incompatible

Hi @marco_1992 & @neilstee

Why do you want to use an (old) package to create a trigger?

It's easy to create a migration with db facade statement https://laravel.com/docs/8.x/database#running-a-general-statement

and this method works for mysql & postgresql which I use.

Activity icon

Awarded Best Reply on Problems With Model Name Eniding With ’s’

ending with 's'

I had the same willing at my beginning with Laravel, but it makes things 'difficult' and it's so easy and better to share same standards, to not end model with 's' that I suggest you to use this rule. Up to you, if you choose to continue this way, in this case lest's know what do you think in some weeks/months ...

PS : you cannot post links the first day but you should post code by inserting it between ```

Apr
10
3 days ago
Activity icon

Replied to Problems With Model Name Eniding With ’s’

The only other problem

In pure Laravel, but there are extensions that use these rules (blueprint for instance). Laravel is nice because it(s open and offers many way of coding but it's GREAT because it comes with GOOD 'standards' and it(s a pity to not use them (at the beginning), there are so many good things to learn before using non standard way if not really needed.

Activity icon

Replied to Problems With Model Name Eniding With ’s’

ending with 's'

I had the same willing at my beginning with Laravel, but it makes things 'difficult' and it's so easy and better to share same standards, to not end model with 's' that I suggest you to use this rule. Up to you, if you choose to continue this way, in this case lest's know what do you think in some weeks/months ...

PS : you cannot post links the first day but you should post code by inserting it between ```

Activity icon

Replied to Redirect On Session Expire

Done automatically by your middleware if auth is used.

Activity icon

Replied to Laravel Sail Change Db Username And Password?

I don't understand your pb, therei is nothing special to do normally, the values you define in .env are taken by docker compose and so by sail cde

It works without pb for me with postgresql.

Apr
09
4 days ago
Activity icon

Replied to Laravel API

So mark it solved :-)

Activity icon

Replied to Remove Duplicated Data From AB BA

You did 90% of the work, just use 2 cases in your havingRaw

havingRaw('SUM(a.qty) > SUM(b.qty) OR ( SUM(a.qty) > SUM(b.qty) AND a.product.id > b.product.id  ) ')
Apr
08
5 days ago
Activity icon

Awarded Best Reply on Laravel 8 With MySQL Server 8 Authentication Problem

Seems to be a php "pb/config", have a look to this page http://blog.ulf-wendel.de/2012/mysql-5-6-sha256-secure-password-support-for-php-mysqlnd/

That said, why are you using a password to access the DB via Laravel, the best method is UNIX_SOCKET for mysql or postgresql

https://programmerlib.com/connecting-your-laravel-project-to-mysql-database/

Activity icon

Replied to How To Multi Id Use To Table Join And Get Multi Areas Name

@dostogir

I did not ask your db query!

Show your MODEL, some data and expected results. ... in the good format ( between ```)

Activity icon

Replied to Laravel 8 With MySQL Server 8 Authentication Problem

You rely of the security of the server, db must be secure, but overall the server. root has all the rights, no need (no more security and probably less by the simple fat that you have to manage one additional pwd) to give it a password to access the db. Personaly I don't access the dbs with root, ideally you should define another unix user with unix_socket access ... for test it 's very useful to choose your unix login. Don't forget to close the thread.

Activity icon

Replied to How To Multi Id Use To Table Join And Get Multi Areas Name

... and

-1- answer my questions

-2- put your code between ``` to have it readable

Activity icon

Replied to Laravel 8 With MySQL Server 8 Authentication Problem

easier than ssh, just to put unix_socket in the plugin field of table user for root or the user you want.

Don't forget to use DuckDuckGo & go for examples, ...

Activity icon

Replied to How To Multi Id Use To Table Join And Get Multi Areas Name

Don't understand.

Show your model, some data and expected results.

Activity icon

Replied to Update DB When User Auto Logged Out After Session Expires

When a user's session expires, user will be automatically logged out from the system.

???

should be

When a user's session expires, auth'users will be redirect to login page (or what you decide)

In a nuttshell : no user -> no request -> no action (no write in the db, ...)

If you really want to write st on the db at the end of the session you have to have a cron job that survey the users (in)activity.

Activity icon

Replied to Laravel 8 With MySQL Server 8 Authentication Problem

HI @fabiothebest

I'm new to Laravel

me ~too

This default .env file ..

Yes because ir's the most used case, and Laravel is not here to teach all the IT...

In mysql/mariadb authentication method is par user , if you want to use sha256 per user other than Laravel and choose UNIX_SOCKET for Laravel user (the one defined in .env)

Personally I have better potgresql, but always without password ( idem for ssh)

Apr
06
1 week ago
Activity icon

Replied to What Is The Right Way To Handle An Eloquent Object?

So mark the solution as Best Answer to close the subject and avoid others to open it in order to see if they can help.

Activity icon

Replied to Laravel Array Validation

'photos.mimes' => 'Only jpeg, png, jpg and bmp images are allowed',

Activity icon

Replied to Laravel 8 With MySQL Server 8 Authentication Problem

Seems to be a php "pb/config", have a look to this page http://blog.ulf-wendel.de/2012/mysql-5-6-sha256-secure-password-support-for-php-mysqlnd/

That said, why are you using a password to access the DB via Laravel, the best method is UNIX_SOCKET for mysql or postgresql

https://programmerlib.com/connecting-your-laravel-project-to-mysql-database/

Activity icon

Replied to PDOException: SQLSTATE[HY000]: General Error: 1 No Such Table: Balances

1 - have a look directly in your db

2 - review any error with your migrate cde

3- review you migration

Apr
03
1 week ago
Activity icon

Awarded Best Reply on Selecting Location Within Range

Put zip code in groups based on 'logic of zipcode' or your own logic and choose zipcodes in the nearby groups.

Let's say you define 'square group', you can reduce to nine groups, the one where original zipcode is and the 8 around. You jsut have to define the length of a square and constuct these data one time.

Apr
01
1 week ago
Activity icon

Replied to Css/ajax/js -> Livewire Or Inertia?

Thanks @tray2 for your reply.

So if I follow you, there is no main difference between this 3 ways of writing code.

I have not enough experience in livewire or interia but I understood that using 'components' should be a good approach to 'better' code such functionality , at least in term of readability / maintenance ? Have you any comment to this remark?

Activity icon

Awarded Best Reply on Getting Unknown Database Error

It's written table announcements does not exist in db / schema mahi_project

Activity icon

Replied to Laravel Shopping Cart Error

What's the value of $this->config? (use dump or dd)

Activity icon

Replied to Email

So it should be good to close this subject.

Activity icon

Replied to Student Mark Sheet With Position Obtained Marks Subject Wise

For me its almost impossible

You are rigth, it's impossible without code :-)

Activity icon

Awarded Best Reply on My Site Was Hacked And The Attacker Create Some Files In Config Folder

Make sur your .env is not public (rights, github, ...)

Chnage your credential.

Is-it really hacked?

  • what are the new config files created?

  • have you analys your server logs?

Activity icon

Replied to My Site Was Hacked And The Attacker Create Some Files In Config Folder

Make sur your .env is not public (rights, github, ...)

Chnage your credential.

Is-it really hacked?

  • what are the new config files created?

  • have you analys your server logs?

Activity icon

Replied to Queue Workers Not Clearing Memory After The Jobs Are Done

So you have to debug and for this you can use php function : memory_get[_peak]_usage

https://www.php.net/manual/fr/function.memory-get-usage.php

log values in critical part of your scripts to see if it's due to closed jobs, running jobs, ...

If you can't use a vps, try also to see the pb in local, you should have access to more data than with a shared hosting.