Director at Novate Ltd

Member Since 6 Years Ago

Mansfield

Experience Points
2,162,125
Total
Experience

0 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
1440
Lessons
Completed
Best Reply Awards
3040
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 50
2,162,125 XP
Mar
06
1 day ago
Activity icon

Replied to Failed To Connect To Repo.packagist.org Port 443: Connection Timed Out), Package Information Was Loaded From The Local Cache And May Be Out Of Date

why did you need to do this?

composer config -g repo.packagist composer https://packagist.org

I never....

Activity icon

Replied to Call Function From Model Accessor

why not put the function in the model where it's needed?

Activity icon

Replied to Trying To Get Property 'id' Of Non-object From Mount()?

As @tykus says, the error does not seem to fit with the code you show. perhaps if you gave us more of the error?

in mount, you should probably set the team_id and then use it in the query

    public function mount($team_id)
    {
        $this->team_id = team_id;

    }

and then use this in the render method


        //get the skills
        $this->skills = DB::table('skills')
            ->where('team_id', '=', $this->team_id)
            ->whereNull('skills.deleted_at')
            ->orderBy('skill_name')
            ->get();
    }

Activity icon

Replied to Root Composer.json Requires Xxxx Found Xxxx In Lock File But Not In Remote Repositories, Make Sure You Avoid Updating This Package To Keep The One From Lock File

composer.lock should be part of your revision control so that when you change or update packages then composer.lock is updated

Then on production you just pull your repository and run composer install, you then get exactly the same setup that you tested with

also, by using the no-dev flag, you leave out those packages that are in the require-dev section such as phpunit that has been the source of at least one major security flaw

Activity icon

Replied to Root Composer.json Requires Xxxx Found Xxxx In Lock File But Not In Remote Repositories, Make Sure You Avoid Updating This Package To Keep The One From Lock File

actually, you are mad. You want newer packages on the production server than you have developed with?

wait, don't tell me, you develop code on the production site also?

Activity icon

Replied to Root Composer.json Requires Xxxx Found Xxxx In Lock File But Not In Remote Repositories, Make Sure You Avoid Updating This Package To Keep The One From Lock File

you should never need to run composer update on a production machine

run composer update locally, test your site works ok then copy composer.lock to production

Then run composer install --no-dev on production and you will get all the same package versions that you had locally when you tested and none of the dev packages such as phpunit

Activity icon

Replied to Validation Rule Changes The Data

if you temporarily ignore validation and just inspect the request class attributes is it wrong there?

ie is the issue that the request class has the wrong value or it becomes wrong when passed into the validation rule

Mar
05
2 days ago
Activity icon

Replied to When To Use A Livewire Component

You only need livewire if you want the user to interact with the component (such as when setting a ranking) otherwise just blade will be fine.

You might be thinking of a Laravel view component?

my article here http://novate.co.uk/using-fontawsome-svg-and-laravel-blade-to-output-a-star-rating/ might also give you some ideas

Activity icon

Replied to Livewire Not Working

when you add @livewireScripts to your site, then this blade tag loads the javascript by inserting into your page;

<script src="http://workbus/livewire/livewire.js....

so does http://workbus correspond with your sites URL?

Check you don't have an application route like /livewire that might conflict with the above route.

Activity icon

Replied to Livewire Not Working

check over your layout to make sure your component is included in a layout that contains the livewire script

check that there are no console errors

check in network tab to see if there are any failed load requests when you refresh the page

Activity icon

Replied to The SQL Shown By My BelongsTo Relation Via ->toSql() Is Different Than What The Error Shows Immediately After Returning That Same Relationship

I don't understand the structure

How can a single completedrOrderItem belong to multiple Orders?

Activity icon

Replied to Livewire Not Working

open your browser developer tools, and go to the network tab. When you change the dropdown you should see a network request.

If not, then check that livewireScripts is installed correctly

Activity icon

Replied to Delete File Inside Public Folder.

Storage will use the default disk, whatever you have that set to in config/filesystems.php

Activity icon

Replied to Livewire Not Working

what do you have in your component?

Activity icon

Replied to Validation Rule Changes The Data

mocking up the same setup, I get the + passed through to the custom rule with no problem.

Are you sure you don't have any custom middleware like the trimstrings middleware?

Activity icon

Awarded Best Reply on Sending Email During Import: No Query Results For Model [App\User]

is this part of laravel excel import?

The entire import is automatically wrapped in a database transaction, that means that every error will rollback the entire import. When using batch inserts, only the current batch will be rollbacked.

If so, then what is happening is that the queue is starting the job but the transaction has not yet been committed to the database, so outside the function you have here, these users do not exist.

https://docs.laravel-excel.com/3.1/imports/validation.html#disable-transactions

or delay your mail jobs until after the import is complete.

Activity icon

Replied to Sending Email During Import: No Query Results For Model [App\User]

either delay the queued emails as you have shown, or send the emails after the import by running a seperate query and mailing all newly imported users

Activity icon

Replied to Fetch Wordpress Posts And Other Details And Display In Laravel Admin

if you have access to the database, you could look at the package corcel

https://github.com/corcel/corcel

Activity icon

Replied to HasMany Relationship Not Working??

so mark @michaloravec answer as best reply since once you fixed the relationship it went into a recursive loop

Activity icon

Replied to How To Display Data On Edit Livewire One Modal CRUD

Sorry I have no idea how you have structured the components

Activity icon

Replied to Sending Email During Import: No Query Results For Model [App\User]

is this part of laravel excel import?

The entire import is automatically wrapped in a database transaction, that means that every error will rollback the entire import. When using batch inserts, only the current batch will be rollbacked.

If so, then what is happening is that the queue is starting the job but the transaction has not yet been committed to the database, so outside the function you have here, these users do not exist.

https://docs.laravel-excel.com/3.1/imports/validation.html#disable-transactions

or delay your mail jobs until after the import is complete.

Activity icon

Replied to Send The Wrong Url To The User's Email By Queuing To Verify The Email

a) this is what I suggested

b) NEVER run php artisan config:cache when you are in development

caching config is stupid advice - it should only be done in production.

Mar
04
3 days ago
Activity icon

Replied to Blade And The Old() Helper

on initial page load he gets the value from the model. That is the point of the default value.

old('permis_habilitation', $formation->permis_habilitation)
Activity icon

Replied to Sending Email During Import: No Query Results For Model [App\User]

before the Mail, try adding $user->refresh();

Activity icon

Replied to Send The Wrong Url To The User's Email By Queuing To Verify The Email

change APP_URL in your .env file to correctly reflect the URL

Activity icon

Replied to Stop Input Event While Running Long Process

You don't need both of these...

wire:model.defer="tex"
wire:input.debounce.2s="compile"

Have a look at the loading states. This can enable and disable classes whilst you are waiting for a response from the server.

https://laravel-livewire.com/docs/2.x/loading-states#toggling-elements

Activity icon

Replied to Blade And The Old() Helper

@jlrdw

Old is for validation errors, you have to yourself code in what is currently stored in db for an edit page.

don't think you are correct there 'old' son

The old helper works exactly as @vincent15000 is trying to use it.

Activity icon

Replied to Blade And The Old() Helper

does it behave the way you want if you just hard code checked?

'It doesn't work' you must know is a very poor analysis.

Check the source in the browser, did you set 'checked' or not?

Activity icon

Awarded Best Reply on Relationship Query

It should work, but for your later sanity, if something hasMany then it should be pluralised

    public function contacts()
    {
        return $this->hasMany('App\Contact');
    }

and why would you not name something according to what it actually is. When you look in your view code its not obvious what data is

        $account = Account::with('contacts')->find($id);
        return view('account.show')->with('account', $account);

and then in the view you can loop over $account->contacts

If it does not work, tell us what happens.

Activity icon

Awarded Best Reply on File Storage Works Locally But Not In Production

no local refers to local filesystem ie, not cloud

you SHOULD need storage in the asset path the problem is with the local setup where it is wrong

Activity icon

Replied to Can We Remove Default Service Providers From Laravel?

its only linking in the class incase its needed.

Messing with these things will give an benefit so small you would not be able to measure it.

Better to spend your time looking how you can make your own code more efficient if you actually have a performance issue.

Otherwise its just premature optimization

Activity icon

Replied to Can We Remove Default Service Providers From Laravel?

If you want to improve the performance, USE the cache, not remove it.

Otherwise you are just messing around and not really addressing any performance issues.

Activity icon

Replied to How To Display Data On Edit Livewire One Modal CRUD

create a public property called $contact

create a public property called $modal_open=false

    public function edit($id){
        
        $this->contact = ContactUs::where('id',$id)->first();

        $this->modal_open = true;

    }

in the view, surround your modal code with @if($modal_open) so that it shows when $modal_open is true and populate the modal with $contact fields

When you call the edit function in livewire, the modal_open will be set to true and the correct data is loaded.

Activity icon

Replied to Resetting Password Unhashes Password

dd $attributes in your controller to check it's actually using your code

Activity icon

Replied to Resetting Password Unhashes Password

breeze takes care of reset password, not the logged in user wanting to change their password

Activity icon

Replied to Laravel Layout

menu cannot extend dashboard

17 lessons completed in 5 years?

Activity icon

Replied to I Can't Start My Laravel

can you delete that last post?

Activity icon

Replied to Password Reset Does Not Work On Localhost

if it works for other emails why would you need to change mail configuration

why does your password reset want to use port 465 when the configuration is 2525

This is the question you need to ask

How are you sending password reset email?

Activity icon

Replied to How To Display Query Execution Time In Terminal

laravel debugbar shows you the execution time of every request

Activity icon

Replied to Login Redirect Is Not Working.

how?

your dashboard route is inside web.php which uses cookies for session authentication

Mar
03
4 days ago
Activity icon

Replied to Laravel 8 Email Verification Not Working With Different Browsers

so the session is not shared between tabs? Thats not so unusual.

Do you have any privacy plugins in your browser?

Activity icon

Replied to Laravel 8 Email Verification Not Working With Different Browsers

is there a difference in the website url between the link you get in the email and the one you logged in with (just the domain part)

Activity icon

Replied to Laravel Chmod 755 Vs 777

its not just about the number, it's about ownership

The first digit represents what the owner of the files can do

The second digit is what members of the same group can do

The third digit is what anyone can do

so you are removing write access by everyone apart from the owner of the file

If you uploaded the files in your own name then the web server will be unable to overwrite them

Activity icon

Replied to Update Without A Submit Button

Seems that Livewire is able to do these kinds of things too but I don't know if by installing it I'll lose some files.

What?

Activity icon

Replied to Period In A URL Gives 403

what happens if you encode it as %2e

what web server are you using locally and in production?

Activity icon

Replied to Laravel 8 Email Verification Not Working With Different Browsers

you have to appreciate that laravel email verification requires the user to be logged in

any access from another browser without first logging in will direct the user to login

Activity icon

Replied to File Storage Works Locally But Not In Production

no local refers to local filesystem ie, not cloud

you SHOULD need storage in the asset path the problem is with the local setup where it is wrong

Activity icon

Replied to Event:generate Does Not Create The Required Files

Is it really this

        'AppEventsThreadReceivedNewReply' => [
            'AppListenersNotifySubscribers'

or

        'App\Events\ThreadReceivedNewReply' => [
            'App\Listeners\NotifySubscribers'

Community Pillar

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