AdamT

AdamT

Web Developer at Agile Payment Solutions

Member Since 1 Year Ago

Sheffield

Experience Points
30,190
Total
Experience

4,810 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
275
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 7
30,190 XP
Oct
23
3 days ago
Activity icon

Replied to Laravel-Excel - Tracking Progress Of Massive CSV Import

I'm guessing you have a loop to process each row of the CSV. You could do a count on the total number of rows and then increment a value every time a row is processed?

You could fire an event, output something (possibly a progressbar), or just record it as a record in an 'import_logs' table in a database.

Activity icon

Replied to How To Set Value In Livewire Globally?

Hi:

Is the emit being called before DOM is complete? Have you tried:

    $(document).ready(function () {
        window.livewire.emit('set:body', body);
    });

I believe you can also use wire:init="function".

Oct
05
3 weeks ago
Activity icon

Replied to Redirecting Users

@mystic I haven't had chance to look at L8 yet but a possibility might be the auth middleware? Using the middleware will allow you to perform whatever checks you need on the user for every request.

Oct
01
3 weeks ago
Activity icon

Replied to Can Anyone Explain The Code In Details?

A guard is used to supply logic that is used to identify authenticated users. This could be a session guard which is used to identify a authenticated user via information stored in the session or possibly a token guard which will identify a user via a token.

Custom guards can be created to identify an authenticated user.

Activity icon

Replied to Can Anyone Explain The Code In Details?

If the result of Auth::guard($guard)->check() is true then the user will be redirected to whatever url HOME defines.

The following link might be useful. Look under Accessing Specific Guard Instances

https://laravel.com/docs/8.x/authentication#authenticating-users

Sep
30
3 weeks ago
Activity icon

Started a new Conversation Expected SSH_FXP_ATTRS Or SSH_FXP_STATUS (server Issue?)

Hi all!

I'm using the SFTP driver in Laravel to fetch files from a remote SFTP server. I have installed the required packages (league/flysystem-sftp) and everything works fine (sometimes).

The issue I am having is intermittent and usually results in the following error:

Expected SSH_FXP_ATTRS or SSH_FXP_STATUS

I think this implies that my application did not receive a response. However occasionally (maybe 20% of the time) the connection will succeed.

I can login to SSH and SFTP (via Filezilla) successfully every time.

I have noticed that their are a lot of attempted SSH logins in the auth.log file, (I'm in the process of restricting SSH to key authentication only).

Since the server I am connecting to is quite low-spec (Digital Ocean's $5 droplet, Ubuntu 20.04).

I am at a bit of a loss as to could be causing this intermittent behavior, has anyone encountered anything like this?

Sep
28
4 weeks ago
Activity icon

Awarded Best Reply on How To Pass A Simple Value To A View

You need to give total a key:

return view('stripe/stripe', ['items' => $items, 'total' => $total]);

Cheers, Adam

Activity icon

Replied to How To Pass A Simple Value To A View

You need to give total a key:

return view('stripe/stripe', ['items' => $items, 'total' => $total]);

Cheers, Adam

Sep
27
4 weeks ago
Activity icon

Replied to Symfony\Component\Routing\Exception\RouteNotFoundException Route [login] Not Defined.

Could this be because you are using the auth middleware in the constructor?

Activity icon

Replied to How To Use Blade Inside Js

You can json_encode variables to a javascript function and then populate the modal within the function before displaying it.

<button type="button" onclick="openModal({{ json_encode($categories) }})">Open Modal</button>
function openModal(categories) {
	console.log(categories);
	//populate modal
        //show modal
}
Aug
31
1 month ago
Activity icon

Started a new Conversation Creating Auth Tokens For A Non-user Model.

Good morning:

My current project requires that we allow a client to login to the system using a code which will be posted to them.

The clients do not have user accounts on the system. I believe I need to generate a token once they have successfully 'logged in'. While the token is not expired/exists the client will be able to navigate the system.

I think I could implement a system which could manage the tokens but was wondering if it would be quicker/easier to use Sanctum? Although I'm not sure if it's possible to tie the API Tokens a different model than User using Sanctum.

I essentially need to create tokens for my Client model.

Many Thanks, Adam

Aug
29
1 month ago
Activity icon

Replied to Login With 2 Pieces Of Information (e.g Acc_number, Post_code). Database Structure?

I do agree and have raised this previously with my boss, however the spec still stands.

I have come across systems which use a similar method for login. For example, my car finance company requires an agreement_number, dob and post code to login: https://customerportal.blackhorse.co.uk/selfservecustomeridentity.aspx

My main query (pun intended) is how best to store these references (possibly acc_no & post_code) in the database for cross-referencing at login?

Activity icon

Started a new Conversation Login With 2 Pieces Of Information (e.g Acc_number, Post_code). Database Structure?

Hi,

I'm building a system where customers can login to view their paid/unpaid invoices and download copy documents.

Customers can login to a frontend using two pieces of information. These pieces of information (references) could be anything (e.g post_code, account_number).

Customers themselves do not have user accounts and the references need to be matched when a customer logs into the system. Once logged in the system fetches the users' invoices.

My question relates to the best way to store these references in the database so they can be cross-referenced when a customer logs in.

How I'm currently doing this:

Each invoice record contains ref1 & ref2 (acc_no & post_code). Once I find an invoice with a matching ref1 & ref2 I simply grab the ref1 value and pull all the invoices matching that reference.

table: invoices
  reference1
  reference2
  Invoice_number

I'm interested to know if their are any other ways to achieve the same functionality?

Many thanks, Adam

Aug
20
2 months ago
Activity icon

Started a new Conversation Add Custom Method To Laravel Nova Trend (TrendResult)

Hi all:

I was wondering if it was possible to add an additional method to a Nova Trend Metric?

I would like to add modified version of showLatestValue() which is defined in Laravel\Nova\Metrics\TrendResult. I have already written the method and it works if I insert it directly into the TrendResult class.

Of course this is not ideal as it would get overridden with any Nova updates.

What would be the best way to insert this method without directly updating TrendResult?

Cheers, Adam