GuntarsV

GuntarsV

Member Since 2 Years Ago

Experience Points 22,470
Experience Level 5

2,530 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 223
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.

07 Nov
9 months ago

GuntarsV left a reply on Blade If Else On Single Line

@BASHY - Great, thanks. Very short and sweet! I will be using this syntax a lot. Performance wise, is this one better or about the same as the other syntax's, or does it really matter?

17 Jul
1 year ago

GuntarsV started a new conversation Format Cell(s) In Tables Component In Mailables Markdown

Hi, Is it possible to format individual cell(s) in the Table's Component? For example in the table markdown code below in the Cost column, if I would like to display cell value in bold if the value is less than $10, is that doable? I tried, and I was able to apply bold with regular html tag if I put them in the static table like one below, but I If I try to dynamically generate the table inside the loop, the html tags show up in the email message i.e. <strong>$9.99</strong> Any thought, suggestions.... please let me know.

@component('mail::table')
| Laravel       | Table         | Cost|
| ------------- |:-------------:| --------:|
| Col 2 is      | Centered      | .99      |
| Col 3 is      | Right-Aligned |       |
@endcomponent
27 May
1 year ago

GuntarsV left a reply on Form Model Binding Relations - How To Bind/populate Relations In A Form?

Form model binding as @joseph.d suggested works great!! Any suggestions on how to validated Relationship form field? Syntax like this don't seem to be working:

$this->validate($request,[
    ''relation[field_name]'=>'required',
]);
13 Jan
1 year ago

GuntarsV left a reply on Php Artisan Not Working After Composer Update

Similar problem here. After I installed Laravel 5.5, everything worked fine, till I created as command with "php artisan make command: myCommand". After that every time I run (for example: php artisan list) I will get this error: In Client.php line 122: Invalid argument supplied for foreach() At the moment I am stuck, any help would be greatly appreciated.

07 Oct
1 year ago

GuntarsV started a new conversation Return Instance With Relationships After Saving It.

How do I return the saved instance with Relationship. Below is the store method, I would like to return the $savedRequest with cropInputMaterial information from another table. Code below doesn't work.

public function store(Request $request)
    {
        $this->validate($request,[
            'dairy_crop_id'=>'required|numeric',
            'crop_input_material_id'=>'required|numeric',
            'rate'=>'required|numeric',
            'cost_per_ac'=>'required|numeric',
            'applied_at'=>'required|date',
        ]);
        $attributes=$request->all();
        $attributes['applied_at']= convertToCarbonObj($request->applied_at);
        $savedRequest=DairyCropInput::create($attributes);
        return $savedRequest->with('cropInputMaterial');
    }

Here is the relation ship I created to cropInputMaterial

public function cropInputMaterial()
    {
        return $this->hasMany(Crop::class);
    }

I know that I could do another query after saving like this:

return FarmCrops::with('cropInputMaterial')->get();

But wouldn't that be a little inefficient, since I have the $savedRequest already? Suggestions are greatly appreciated!! I would like to have a clean and efficient code. Thanks.

01 Sep
1 year ago

GuntarsV left a reply on Best Practices For Custom Helpers On Laravel 5

How do i include/use, for example Carbon class inside helpers file?

10 Dec
2 years ago

GuntarsV left a reply on [Laravel 5] Modify Input Before Validation

How about overwriting it directly like this: $request->attribute = 'new value';

14 Nov
2 years ago

GuntarsV left a reply on [L5] How To Delete A File Using Filesystem

The same here. This line of code is not working for me it will return False. Line of code: \Illuminate\Support\Facades\Storage::delete(storage_path().'/app/'.$file->file_path); But if I use this line of code: unlink(storage_path().'/app/'.$file->file_path); This will delete the file.

If I just echo out this part: storage_path().'/app/'.$file->file_path It will give me a valid link that I can paste into explorer and get the file.

15 Oct
2 years ago

GuntarsV left a reply on Laravel 5.3.16: Gulp ERRORS

Similar issue here. Installing Gulp went well, but when I try to start Gulp from cmd I get these errors: TypeError: Cannot read property 'mergeConfig' of undefined at E:\Web\wamp64\www\blog\node_modules\laravel-elixir-vue\main.js:4:19 at E:\Web\wamp64\www\blog\node_modules\laravel-elixir\dist\index.js:29:16 at Array.forEach (native) at global.Elixir (E:\Web\wamp64\www\blog\node_modules\laravel-elixir\dist\index.js:28:24) at Object. (E:\Web\wamp64\www\blog\gulpfile.js:16:1) at Module._compile (module.js:409:26) at Object.Module._extensions..js (module.js:416:10) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Module.require (module.js:353:17) at require (internal/module.js:12:17)