GuntarsV

GuntarsV

Member Since 2 Years Ago

Experience Points 14,870
Experience
Level
Lessons Completed 147
Lessons
Completed
Best Reply Awards 0
Best Answer
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    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 Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

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

07 Nov
1 month 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
5 months 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          | .9     |
| Col 3 is      | Right-Aligned |       |
@endcomponent
27 May
6 months 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
11 months 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. 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?

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

How do I include/use, for example Carbon class inside the helpers file? Thanks.

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);

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)