PovilasKorop

PovilasKorop

Member Since 4 Years Ago

at Freelance web-developer

Experience Points 8,850
Experience Level 2

1,150 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 37
Lessons
Completed
Best Reply Awards 6
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.

05 Feb
5 months ago

PovilasKorop left a reply on Localisation With Auth:routes

@davedriesmans not sure if it's still relevant, but I've written an in-depth article here: https://laraveldaily.com/multi-language-routes-and-locales-with-auth/

16 Dec
7 months ago

PovilasKorop left a reply on Add More Image To A Post

@bokino12 use Spatie MediaLibrary package that uses polymorphic relations to allow saving multiple files per model (article in your case): https://github.com/spatie/laravel-medialibrary

PovilasKorop left a reply on How To Laravel Validate To Input Only Numbers And Letters A-z And A-Z And Space?

Should be

'project' => 'regex:/^[a-zA-Z0-9 ]+$/'.

Not a-b, but a-z.

08 Dec
7 months ago

PovilasKorop left a reply on Add An Task In A Calendar By Clicking A Calendar Date

@sayedulsayem following up to that article (I'm the author), I've written another article, seems like similar to what you need: https://quickadminpanel.com/blog/laravel-fullcalendar-edit-events-with-bootstrap-modal/

17 Nov
7 months ago

PovilasKorop left a reply on Update Query Not Working

I think the problem is too many brackets here where([['uid','=','173']])

Should be where('uid', 173)

07 Nov
8 months ago

PovilasKorop left a reply on PLEASE BRING BACK THE OLDER LARACAST DESIGN

Dear author of the post, first please use correct names and respect them. Project is called Laracasts, not Laracast. And it's Jeffrey, not Jeff.

14 Oct
9 months ago

PovilasKorop left a reply on Date Filter

You're missing a semicolon ; after where('paydate', '<', $data2)

04 Jun
1 year ago

PovilasKorop left a reply on How To Create Relationship For This Structure (Teams And Fixtures)?

@milanchheda here's an excerpt from our own similar demo-project in model app/Game.php:

    public function team1()
    {
        return $this->belongsTo(Team::class, 'team1_id')->withTrashed();
    }
    
    public function team2()
    {
        return $this->belongsTo(Team::class, 'team2_id')->withTrashed();
    }

See whole demo-project for Sports League here: https://github.com/LaravelDaily/SportsLeague-QuickAdminPanel

16 Apr
1 year ago
16 Dec
1 year ago

PovilasKorop left a reply on Best Method To Manage Tables Of Data.

Agree with datatables approach, including server side, as mentioned.

No need to reinvent the wheel. And no need to get deeper into Vue if you don't need it.

Here's a link of demo we recently made https://github.com/LaravelDaily/Laravel-Datatables-Demo

PovilasKorop left a reply on Best Way To Handle Status Field !?

I always use separate tables like users_statuses, posts_statuses etc. Then it's much easier to add a new status later if needed.

But it depends on your preference, as Bobby said.

PovilasKorop left a reply on View To Manage Many-to-Many Relationships Between Two Models

I've built some examples in the past, here's one of them: https://github.com/LaravelDaily/Laravel-many-to-many-demo

In general, you need to use select input with multiple options, and I advice select2 for that.

For back end, you just use sync() to update the data.

Hope that helps.

02 Aug
1 year ago
17 Jul
1 year ago

PovilasKorop left a reply on Query Model Through A Third Model Instead Of A Table

@Toun from what I understand, it may be coming in 5.5 (maybe, not merged yet). For now - yes, wherePivot is the only way. I think.

PovilasKorop left a reply on Time Tracking

Toggl.com - been a (free) user for several years and really happy.

PovilasKorop left a reply on Many To Many Working Oneway Only

@arctushar have you defined the relationship in the model?

In your User.php model you should have function companies() with return $this->belongsToMany(Company::class). Do you have it?

PovilasKorop left a reply on Using BelongsToMany Vs Creating Intermediate Table's Model

Generally, SQL query should be faster (if written efficiently), especially if it's quite complex.

Sorry, I didn't dig deeper into your particular examples, but here are two things that can help:

  1. Test actual SQL queries and their speed in Laravel Debugbar
  2. Maybe additional methods like wherePivot() could help: http://laraveldaily.com/wherepivot-wherepivotin-additional-filters-many-many-relationships/

PovilasKorop left a reply on Laravel Executing GET Instead Of POST Request

  1. Check your laravel.log for errors
  2. I assume there was some kind of validation error on POST and Laravel redirected to GET page with 200.

Similar problem: https://laracasts.com/discuss/channels/requests/post-returns-405-via-ajax-while-put-and-non-ajax-post-returns-200?page=0

15 Nov
2 years ago

PovilasKorop left a reply on Should I Be Using Design Patterns?

@phpMick depends on the criteria. If we're talking about business from open-source then Invoice Ninja is an example, if you want to get quality code to lean from - then it's probably the smallest Confomo.

PovilasKorop left a reply on Should I Be Using Design Patterns?

@phpMick last week I did a Laravel products review series - so check out one of those 6 products and their code freely available on GitHub: 10 quick lessons from 6 Laravel product reviews

PovilasKorop left a reply on Send Files Via Email From Register Form

Ok I give up helping on every step here, ultimately you need to use $request->files() and pass it to RegisterController somehow.

PovilasKorop left a reply on Is It Really Laravels Job?

I think you can always use custom code instead / on top of Laravel "magic", that's not forbidden in any way.

But I do feel your pain that upgrading an existing project to each version is harder. Indeed.

PovilasKorop left a reply on Send Files Via Email From Register Form

Oh right, then change that to ... function ($message) use ($data)

PovilasKorop left a reply on MethodNotAllowedHttpException Thrown When Uploaded File Is Larger Than Upload_max_filesize

Probably after failure you get redirected to some other URL with not allowed method.

Inspect Network calls in browser development tools and look for redirects like 302 or something.

PovilasKorop left a reply on Should I Be Using Design Patterns?

I would suggest to look at the code of already built Laravel applications available on GitHub - what patterns are used there, if any. And learn from that.

In my experience, using design patterns comes from a problem of better structured code, not the other way around. If you feel that your code is doing OK without using fancy patterns (and that can be confirmed by other developers if you have a team), then you don't need it.

PovilasKorop left a reply on Send Files Via Email From Register Form

Inside of mail send function you cannot use Input:: facade, it's not available there - for that you wrote use $input, so play with $input variable there.

PovilasKorop left a reply on Do You Have A Simple Way To Quickly Create Forms?

@Snapey thank you for mentioning Quick Admin Panel, I'm one of its creators. @orrd feel free to use and give any feedback, we will try to improve our tool, or possibly re-use it for the case like yours? Let's have a chat here or email to [email protected]

PovilasKorop left a reply on Laravel Collections Forall Method?

Guess what - it's coming in 5.4: see Taylor's Twitter

PovilasKorop left a reply on Which Laravel Admin Panel Should I Use?

There are a lot of adminpanel and CRUD generator packages on the market now, about a dozen. We've created our own QuickAdmin, available in two versions:

  • Free as a package on GitHub: https://github.com/LaravelDaily/quickadmin - you create a fresh Laravel project, then use our package to generate adminpanel in it - creating CRUDs, menus etc.
  • Online adminpanel generator: https://quickadminpanel.com/ - you create adminpanel visually online with our CRUD builder, and then download it as a full Laravel 5.3/5.2 project, with all files and with no packages used, just clean Laravel code (here's an example adminpanel). We charge for this generator $9.99 per adminpanel, already have paying customers who like that model more than learning syntax of packages .

But, to be fair, other packages are really good, here are links to some of them:

22 Mar
3 years ago

PovilasKorop left a reply on No New Menus - Issue In QuickAdmin

@ykonijn should be fixed now, we released a new version 1.1.1

PovilasKorop left a reply on No New Menus - Issue In QuickAdmin

Thank you @ykonijn - we've received your question on GitHub and will try to look at it later this week, will update on GitHub.

09 Mar
3 years ago

PovilasKorop left a reply on Undocumented Eloquent Super Powers

I've written an article about similar topic a while ago: 10 less-known (but awesome!) Laravel Collections methods http://laraveldaily.com/10-less-known-but-awesome-laravel-collections-methods/

29 Feb
3 years ago

PovilasKorop left a reply on Looking For Basic CRUD Laravel App

If you want a CRUD like adminpanel, try our package QuickAdmin: http://quickadmin.webcoderpro.com/

03 Nov
3 years ago

PovilasKorop left a reply on Converting Carbon Instance To D/m/Y For Form Input

From your code it's unclear where $dateActive comes from, but it should be something like Carbon::create($old_date)->format('d/m/Y')

02 Nov
3 years ago

PovilasKorop left a reply on Redirection Problem

From the docs: When a user is successfully authenticated, they will be redirected to the /home URI, which you will need to register a route to handle. You can customize the post-authentication redirect location by defining a redirectPath property on the AuthController: protected $redirectPath = '/dashboard';

http://laravel.com/docs/5.1/authentication#included-authenticating

22 Oct
3 years ago

PovilasKorop left a reply on Difference Between A "route Middleware" And A "controller Middleware"?

Simple - like in your example, Middleware is used on GROUP of Controllers, which means you don't have to repeat middleware in all Controllers. Assigning in Constructor of Controllers is more for exceptions, for kind of separate, one-time middleware that is different from routes. But even then it's hard to come up with example which could not be done in Routes.php

18 Oct
3 years ago

PovilasKorop left a reply on Route Controller

A little deeper - wrote an article on it: Moving Controllers to sub-folders in a correct way - http://laraveldaily.com/moving-controllers-to-sub-folders-in-a-correct-way/

30 Sep
3 years ago

PovilasKorop left a reply on Auth::id() Give Null

Try Auth::user()->id

23 Jul
3 years ago

PovilasKorop left a reply on Can't Laracast Be Free? :(

Are you serious? So you want Jeffrey to work for free? Do you yourself work for free and not get paid? It's as cheap as it can get for such quality content.

If you don't have a card, then ask someone who does have. Please show some respect for the author of this wonderful project.