sohexaxok

sohexaxok

Member Since 6 Months Ago

Experience Points
810
Total
Experience

4,190 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
0
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start-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-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-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist 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 1
810 XP
Jan
29
3 weeks ago
Activity icon

Replied to Building SPA, Routes Not Working

Oow thanks. That works really good.

Activity icon

Started a new Conversation Building SPA, Routes Not Working

Hi, Im trying to build SPA and I need to make axios call to endpoint in my routes. How can make this api call work?

Here are my routes

Route::get('/{any}', function () {
    return view('default');
})->where('any', '.*');

Route::get('events', '[email protected]')->prefix('api');
Jan
22
1 month ago
Activity icon

Started a new Conversation Write Test For Resource

Hi,

I have a resource for my API endpoint with a resource collection, but I want to test some logic for this resource collection. How can I write a test for this? This is my resource class

class CardCollection extends ResourceCollection
{
    public $resource;

    public function __construct(Collection $cardCollection)
    {
        parent::__construct($cardCollection);

        $this->resource = $cardCollection;
    }

    public function toArray($request): array
    {
        return $this->collection->sortByDesc('created_at')->transform(function (Card $card) use ($request) {
            return (new CardResource($card))->toArray($request);
        })->sortBy('status')->toArray();
    }
}
Jan
21
1 month ago
Activity icon

Replied to Updating Project Not Working

I find the update method more readable than fill and save. Thanks for your replies.

Activity icon

Started a new Conversation Updating Project Not Working

I can't find out why my project model won't be updated. I set the data and then call update on it, but it doesn't work. Can someone help me?

Here is my code

public function update(Project $project)
{
    if (request()->input('active') === 'on') {
        $project->activated_at = now();
    }

    $project->update(request()->all());

    return redirect()->back();
}
Jan
19
1 month ago
Activity icon

Started a new Conversation Calculate Week Number With Dates

Hi. I have a date. I need to calculate the week number of the data and also te start and end of the date. Can someone help me with this? I can't find anything in Laravel documentation.

Jan
07
1 month ago
Activity icon

Replied to URL For Command

Thanks! I needed the controller option.

@fylzero Your answer was also good, but the controller option helped a lot as well. You both try to help, please don't fight for helping me.

@jove Can you tell me more about this caching?

Activity icon

Started a new Conversation URL For Command

How can I call artisan commando’s when openingen a url? I don't like the command line. Is this possible, how?

Jan
02
1 month ago
Activity icon

Replied to Validating Against Array If "required_if"

THanks for the quick reply. THis works perfectly. THanks.

Activity icon

Started a new Conversation Validating Against Array If "required_if"

Hi,

I have a field that is optional based on the selection you make in a dropdown. If one of these special items is set or the pick the options "various", the text field needs to be required.

I tried this with required_if, but it seems you can only pass one field to it. How can I check on multiple conditions?

Dec
17
2 months ago
Activity icon

Started a new Conversation Extra Parameter In URL Not Working

Hi All,

I have the following route

Route::get('/sports/{league}/{club}', 'Clubs\[email protected]');

Now I added extra ID in url, but I can't get this ID in my controller

Route::get('/sports/{id}/{league}/{club}', 'Clubs\[email protected]');
public function product(League $league, Club $club, $id)
{
    return view('sports.league.club',compact('league','club'));
}

How to make this work?

Dec
06
2 months ago
Activity icon

Started a new Conversation How Can I Get Last Object In Array

let arr = [
    {
        id: 1,
        key: 'value',
    },
    {
        id: 2,
        key: 'value',
    }
    {
        id: 3,
        key: 'value',
    }
];
Activity icon

Started a new Conversation Google Calendar Events

Hi guys,

Do you know a package where I can insert events in google calendar. The documentation is hard to read and I really can use some help.

Any resource is good.

Sep
29
4 months ago
Activity icon

Started a new Conversation For Loop In Vue Issue

I'm playing for the first time with VueJS, but I get this error in the console: [Vue warn]: Property or method "bottle" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initialising the property.

What does this mean? I tried googling but couldn't find anything. This is my code:

<div v-for="bottles in bottle">
    <div>{{ bottle.type }}</div>
</div>

getBottles() { 
    axios.get('/api/bottles/get').then(response => {
        this.bottles = response.data;
    })
},
Sep
03
5 months ago
Activity icon

Started a new Conversation Routes Are Not Using Https

Hi,

I'm using cloudflare SSL and have setup my application correctly. In my env I also set the APP_URL to contains the https url. However on login and some other forms the application still redirects to http. How can I fix this?

Aug
31
5 months ago
Activity icon

Started a new Conversation Windows Deleting Node_modules

Hi,

I need to delete the node_modules directory from my project on windows. How can I do that? I tried rm -rf node_modules but that doesn't work in windows. What is the windows way of doing this?

Aug
29
5 months ago
Activity icon

Replied to Pagination Or Chunk?

Thanks for the large explanation

Aug
27
5 months ago
Activity icon

Started a new Conversation Logging In Job Class

I'm stuck with debugging my job class. Whenever I use the warning helper method in the job, I don't see the log come up in my logs files. I also tried using the Facade. But no results

Any ideas?

Activity icon

Started a new Conversation Pagination Or Chunk?

Hi,

I was reading in the docs and found the chunk and pagination method. According to the docs chunk is used if you don't want to have too much data in memory and once, but what about pagination? That's doing the same thing right?

Can someone explain the difference between them?

Aug
21
6 months ago
Activity icon

Replied to Project To PHP 7.1

I just wanted to know the return type! @bobbybouwmann helped me out with that.

@jlrdw You seem to talk about a lot of different things which makes this really hard for me... I just want to set the return type to make sure I return the correct kind of object

Aug
18
6 months ago
Activity icon

Started a new Conversation Project To PHP 7.1

Hi,

I'm upgrading a Laravel 5.6 project to PHP 7.1, but I get this error: Return value must be an instance of App\Http\Controllers\Object, instance of Illuminate\View\View returned

class ComputersController extends Controller
{
    public function index() : Object
    {
        $computers = Computer::all();

        return view('computers.index', ['computers' => $computers]);
    }
}

Any idea why I get this error? View is object as well right?