NoxxieNl

NoxxieNl

Member Since 11 Months Ago

Experience Points
11,340
Total
Experience

3,660 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
96
Lessons
Completed
Best Reply Awards
1
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 3
11,340 XP
Jun
24
3 months ago
Activity icon

Replied to Domain A Redirect To Domain B

Ik looks like i found it, forge provision its sites to redirect all www trafic to the none www version.

Because of that lets encrypt cannot reach the www version.

However Firefox does not allow the redirect from www to non www when then www does not have a ssl certificate for it...

Kinda strange and dunno if it has anything to do with my server the provisioning or something else

Activity icon

Replied to Domain A Redirect To Domain B

but both have there own server {} record in nginx.

Activity icon

Started a new Conversation Domain A Redirect To Domain B

Hiya guys,

I have a issues and I cannot to figure it out.

I have 2 domains running on the same nginx instance. (domaina.com, domainb.com)

domaina.com has SSL configured and running domainb.com does not

when I try to enter domainb.com it redirects (301) to domaina.com,

I have looked everywhere but I cannot figure out why this happens.

My second issue is, that with domaina.com the letsencrypt works for the non WWW variant but it gets a 400 response when its tries to request a request for the www version.

the DNS for www is set to CNAME with "@".

Does any of you guys have any idea to work out these two problems?

Jun
15
3 months ago
Activity icon

Replied to Save Relation And Polymorphic Relation In One Go

As soon as I posted this, the light turned on in my head (And some kind of brain fart left my ears..)

$mail = Erpmail::find(1);

$attachment = new ErpmailAttachment;
$attachment->required = true;
$attachment->required_multiple_cases = false;
$attachment->use_letterhead = true;
$attachment->attachable()->associate(ErpmailErpdocument::find(1));

$mail->attachments()->save($attachment);

works like a charm :)

Activity icon

Started a new Conversation Save Relation And Polymorphic Relation In One Go

Hiya guys :-),

I have three tables:

Erpmails
- id
- name
Erpmail_attachments
- id
- erpmail_id
- attachable_id
- attachable_type
Erpmail_erpdocuments
- id
- name
- description

erpdocuments is an attachable type of attachments.

How can I insert a polymorphic relationship within attachments as the same time I am creating a relation to the erpmails table.

So far I only came up with:

$mail = Erpmail::find(1);

$attachment = new ErpmailAttachment;
$attachment->required = true;
$attachment->required_multiple_cases = false;
$attachment->use_letterhead = true;
$attachment->attachable_id = 1;
$attachment->attachable_type = (new ErpmailErpdocument)->getMorphClass();

$mail->attachments()->save($attachment);

i cant figure out how to attach the attachable model in one go, Any of you guys got a brilliant tip?

Thanks in advance :)

Activity icon

Replied to Naming Convention Table

Thanks for that :-). Thought so, just checking!

Activity icon

Started a new Conversation Naming Convention Table

Hiya all,

I try to use the Laravel naming convention as much as I can, although I am a bit stuck now...

I got a table erpmails.

each erpmail record can have multiple "actions".

As such would the table name be erpmail_actions or erpmails_actions, I think erpmail_actions is the correct one (cause of the OneToMany relation), but checking here to make sure.

Activity icon

Replied to Eloquent; One Model, Relation To Two Models

Yeah.... I was not looking enough, thanks for that found it :-)

Jun
13
3 months ago
Activity icon

Started a new Conversation Eloquent; One Model, Relation To Two Models

Hiya all,

I have a legacy database and I am trying to build eloquent around it but I am a little stuck...

I have three tables:

  • Groups
  • Records
  • Attachments

The attachments table has two fields attachable_id and attachable_type. The attachable_id can contain a ID for Groups or for Records, with the attachable_type being either record or group.

How can I define a relationship on the attachments model to create a correct relationship for this? (Or two relationships for that).

I tried a where statement on the relation $this->hasMany(Group::class, 'attachable_id', 'id')->where('attachable_type', 'group'); though it fails cause it tries to get the column from the group model.

I have no clue how to do this... Does anyone can point me in the right direction?

Jun
05
3 months ago
Activity icon

Replied to Job Queue Monitor

Wouldn't that be unneeded load on the database, updating the record again and again. This is what Redis is al about for fast setting and retrieval.

By retrieving it from the database maybe some unwanted database load is done?

Jun
04
3 months ago
Activity icon

Replied to Job Queue Monitor

Well sometimes I want to dispatch jobs that sends data to a web service (SOAP ...) I want the end-user to see the progress of that specific job in order to know if it is "working" or that it's completed.

When it is, the end-user can do something else with it.

(The progress can be a progress bar or just a toastr notification or something).

Sometimes you want to provide that information to the end-user, and possibly you can use the Redis::subscribe() and Redis::publish() you can fire off a broadcast event to update it with laravel echo and pusher or something.

Though you need to add the authenticated user to the job so the broadcast event knows were to broadcast to :-).

Activity icon

Started a new Conversation Job Queue Monitor

Hiya guys,

I am in the need of giving a status monitor back to the end-user how far the queue job is done. (0% to 100%). I searched the dark and lonely ends of Github for it, and all I could find was queue job monitors that utilize the database in order to keep track of the job status.

Most of them also claim to work together with Horizon, in order to let both run.

And it got me thinking when you use Laravel horizon you must set your queue connection to Redis. Wouldn't it be handier to create a job monitor queue that also utilizes the Redis facade? Because of the fast writes that are done to update the percentage done, it would be much easier to do so.

Maybe an option to persist data to a database once the job is done or so, is this idea any logic? Or am I just missing here something?

May
19
4 months ago
Activity icon

Started a new Conversation Homestead Soap Install

Hiya guys,

Small question,

I know I can install php soap extension using sudo apt install php7.4-soap. However if I want to make this available for php7.3,2,1 and php5.6

Do I need to sudo apt install php7.3-soap etc?

May
12
4 months ago
Activity icon

Started a new Conversation Add Laravel ServiceProvider In Sub Folder

Hiya all,

Currently I am creating a composer package that is not depending on Laravel, however I would like to add laravel support for it (ServiceProvider, Fascade ed.).

Is it smart to add it to the main package and just put the files inside a laravel directory, or create a different package for laravel that just includes the depedency of the other composer package?

I think its kinda overhead to create 2 packages for it...