PovilasKorop

PovilasKorop

at Freelance web-developer

Member Since 4 Years Ago

Experience Points
8,940
Total
Experience

1,060 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.

Level 2
8,940 XP
Aug
18
1 month ago
Activity icon

Replied to Nested Route Not Found

@ftiersch blind guess - maybe your Controller method doesn't have all the parameters? It should be

function editCustomSpot($slug, $id, $spotSlug, $spotId) { 
    // ... 
}
Activity icon

Replied to How To Redirect User Different Page

@utpal2015 no, better way is to override $redirectTo property. Excerpt from my article:

For example, you want to register to different URLs based on the role of new user. Then you can create a separate method in the same class LoginController, with name redirectTo():

protected function redirectTo()
{
    if (auth()->user()->role_id == 1) {
        return '/admin';
    }
    return '/home';
}

The method behavior will override $redirectTo property value, even if the value is present.

My article is about registration, but same applies to login controller, see original: https://laraveldaily.com/9-things-you-can-customize-in-laravel-registration/

Aug
14
2 months ago
Activity icon

Replied to Implementing Article Path

Agree on package recommendations, I've shot a video review for it https://youtu.be/8aI70pCcl1E

Aug
12
2 months ago
Feb
05
8 months ago
Activity icon

Replied to 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/

Dec
31
9 months ago
Dec
16
9 months ago
Activity icon

Replied to 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

Activity icon

Replied to 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.

Dec
08
10 months ago
Activity icon

Replied to 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/

Nov
17
10 months ago
Activity icon

Replied to Update Query Not Working

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

Should be where('uid', 173)

Nov
07
11 months ago
Activity icon

Replied to Please Bring Back The Older Laracasts 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.

Oct
14
1 year ago
Activity icon

Replied to Date Filter

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

Jun
04
1 year ago
Activity icon

Replied to 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

Apr
16
1 year ago
Activity icon

Replied to Route() In Mail Generates Urls With Serverip Instead Of Domain

What is APP_URL in your .env file?

Dec
16
1 year ago
Activity icon

Replied to 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

Activity icon

Replied to 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.

Activity icon

Replied to 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.

Aug
02
2 years ago
Jul
17
2 years ago
Activity icon

Replied to 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): https://github.com/laravel/framework/pull/17833/files

For now - yes, wherePivot is the only way. I think.

Activity icon

Replied to Time Tracking

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

Activity icon

Replied to 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?

Activity icon

Replied to 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/
Activity icon

Replied to 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

Nov
15
2 years ago
Activity icon

Replied to 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.

Activity icon

Replied to 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

Activity icon

Replied to 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.

Activity icon

Replied to 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.

Activity icon

Replied to Send Files Via Email From Register Form

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

Activity icon

Replied to 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.

Activity icon

Replied to 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.

Activity icon

Replied to 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.

Activity icon

Replied to 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]

Activity icon

Replied to Laravel Collections Forall Method?

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

Activity icon

Replied to 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:

Mar
22
3 years ago
Activity icon

Replied to No New Menus - Issue In QuickAdmin

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

Activity icon

Replied to 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.

Mar
09
3 years ago
Activity icon

Replied to 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/

Feb
29
3 years ago
Activity icon

Replied to Looking For Basic CRUD Laravel App

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

Nov
03
3 years ago
Activity icon

Replied to Converting Carbon Instance To D/m/Y For Form Input (v4.2)

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

Nov
02
3 years ago
Activity icon

Replied to 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

Oct
22
3 years ago
Activity icon

Replied to 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

Oct
18
3 years ago
Activity icon

Replied to 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/

Sep
30
4 years ago
Activity icon

Replied to Auth::id() Give Null

Try Auth::user()->id

Jul
24
4 years ago
Jul
23
4 years ago
Activity icon

Replied to 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.