Chris1981

Chris1981

Member Since 3 Years Ago

Experience Points
17,060
Total
Experience

2,940 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
130
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.

Level 4
17,060 XP
Feb
13
4 months ago
Activity icon

Replied to Call To A Member Function Store() On String When Testing Uploads

@psylogic Ohhhhhhhhhhhh ...... My 'filename' in the test wasn't enclosed in an array ... It works perfect now! .... Thank you so much

Feb
12
4 months ago
Activity icon

Replied to Call To A Member Function Store() On String When Testing Uploads

@psylogic I still get the Unable to find a file at path with that code .... arghhhhhhh

Activity icon

Replied to Call To A Member Function Store() On String When Testing Uploads

@jeffreyvanrossum I thought that as well, but the store method creates a unique filename which is assigned, so that doesn't seem to be the case ... So frustrating

Activity icon

Replied to Call To A Member Function Store() On String When Testing Uploads

@jeffreyvanrossum ... When i use the frontend, the images get saved to storage/app/public/images

Activity icon

Replied to Call To A Member Function Store() On String When Testing Uploads

@jeffreyvanrossum I changed it to filename[] and am now getting the following error; Unable to find a file at path [images/doBjcK4HfOkapmqDtEsGXMPj3ujf0tOp5L2NdcEQ.jpeg]

@sti3bas its still returning the same error

Activity icon

Replied to Call To A Member Function Store() On String When Testing Uploads

Hey @jeffreyvanrossum .... I want the user to be able to submit one, or multiple images

Activity icon

Started a new Conversation Call To A Member Function Store() On String When Testing Uploads

Hey Guys,

I'm having real issues testing my file upload functionality, I just cant seem to get it to work.

In my controller i have the following code;

if ($request->hasFile('filename')) {
    foreach ($request->file('filename') as $image) {
        if ($upload = $image->store('images', 'public')) {
            $filename = $upload;
            // more logic here
        }
    }
}

This works fine for uploading files on my frontend, but my test is failing. My test looks like so;

Storage::fake('public');

$this->postJson('/api/upload', [
    'filename' => $image = UploadedFile::fake()->image('fakeimage.jpg')
]);

Storage::disk('public')->assertExists("images/{$image->hashName()}");
Storage::disk('public')->assertMissing('images/missing.jpg');

The error im seeing is as follows;

Symfony\Component\Debug\Exception\FatalThrowableError: Call to a member function store() on string

I have no idea why this would work on the frontend, but fail on the test.

Any help would be greatly appreciated.

Feb
08
5 months ago
Activity icon

Replied to Securepay Payment Gateway

Hey @jlrdw ... Thanks for that. I've had a look at quite a few resources, and also tried that Omnipay package, but it all seems to take users offsite.

I'm trying to find some examples that keep a user on my site.

Thanks for your help

Activity icon

Started a new Conversation Securepay Payment Gateway

Hey Guys,

I'm wondering if anyone here has interacted with the SecurePay Australian payment gateway.

If you have, could you share a package, or some code ... Im having trouble learning how to go about it.

Thanks Muchly!

Jan
17
5 months ago
Activity icon

Replied to Is It Worth Using Passport Routes?

Hey @tisuchi

Yes thats correct

Activity icon

Replied to Is It Worth Using Passport Routes?

Hey @tisuchi

Yes, I would like to use the Passport system as the work behind it has already been done. But I don't really need to register clients as I know that the only clients allowed to access the API will be my own Frontend system.

So that kind of leaves me building out my own Login and Token Refresh endpoints.

Can that be done?

Activity icon

Started a new Conversation Is It Worth Using Passport Routes?

Hey Guys,

I would love some advice. I am building 3 sites with React which will then get all their info from a Laravel API.

There will be NO other frontends or clients connecting to the API, so it will purely be for my own consumption.

In this case, is it worth using the /oauth/token endpoint and sending through client id's and client secret's for those 3 sites?

If it's not. What would be the best way to return the tokens response that passport sends back for a password grant, i.e token_type, expires_in, access_token, refresh token

What would that custom login and token refresh methods look like?

Thanks guys

Jan
15
5 months ago
Activity icon

Started a new Conversation Testing The Passport /oauth/token Functionality

Hey Guys,

I'm wondering if anyone has any examples of testing the Passport /oauth/token endpoint using the password grant type.

I can't seem to find any examples online for this and im not sure how to go about it.

Any advice / examples would be greatly appreciated.

Jan
10
6 months ago
Activity icon

Started a new Conversation API Response Macro

Hey Guys,

I'm giving the Laravel Macroable thingo a shot for the first time to create my API responses instead of putting them in something like the BaseController.

I was wondering if you could have a look at the code below and tell me if there is anything I can improve on in regards to keeping the response as close to 'standards' as possible.

Any changes, improvements or advice would be greatly appreciated.

public function boot()
{
    Response::macro('success', function ($message, $data, $status = 200) {
        return Response::json([
            'success' => true,
            'message' => $message,
            'data' => $data
        ], $status);
    });

    Response::macro('error', function ($message, $errorMessages = [], $status = 400) {

        $response = [
            'success' => false,
            'message' => $message,
        ];

        if (!empty($errorMessages)) {
            $response['data'] = $errorMessages;
        }

        return Response::json($response, $status);
    });
}
Jan
09
6 months ago
Activity icon

Replied to Advice On Multi Domain Project Layout

@martal ... That makes sense ... Thank you, sorry to keep bugging you

Activity icon

Replied to Advice On Multi Domain Project Layout

Hey @martal ... I was wondering, how would you create controllers and routes that are common across all the different sites using the structure you gave at the top of this conversation?