ctomasz

ctomasz

Member Since 5 Years Ago

Łódź, Poland

Experience Points 15,020
Experience Level 4

4,980 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 379
Lessons
Completed
Best Reply Awards 1
Best Reply
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.

21 Sep
2 years ago

ctomasz left a reply on V-if Inside Template

@ohffs https://jsbin.com/cazaruqojo/edit?html,js,output check it out this example, seem it work correctly

Sorry but maybe I do not understand your problem :-)

20 Sep
2 years ago

ctomasz left a reply on V-if Inside Template

@ohffs this solution should work

    <select name="starttime" id="starttime">
        <option v-for="time in times[date]" value="@{{ time.timestamp }}" :disabled="time.booked">
                @{{ time.formatted }} <template v-if="time.booked">@{{ time.booked }}</template>
        </option>
    </select>
19 Sep
2 years ago

ctomasz left a reply on Using Repositories Inside Of Service Providers

probably because of that : https://github.com/laravel/framework/blob/5.2/src/Illuminate/Foundation/ProviderRepository.php#L139

at this way should work

 public function boot(RoleRepository $role)
{
}

ctomasz left a reply on V-if Inside Template

@ohffs At this moment your code provides this: show all but some of them can be selected and other can not.

if you want to hide some of options where 'time.booked == false' then move "v-if to ":

 <option v-for="time in times[date]" v-if="time.booked" value="@{{ time.timestamp }}" :disabled="time.booked">
18 Sep
2 years ago

ctomasz left a reply on Displaying A Button If Method Returns False?

Have you checked HTTP status code for those responses ? should be 200 for TRUE or 4xx for FALSE ?

ctomasz left a reply on Skip Route Group From Middleware

@dmeganoski no offense :-) , I just like to discuss ... ( and I can learn from others).

though it would be better to use a trait than to have to call $this->implementation all the time.

Could you provide some small example how to use trait in this case (in your opinion) ?

on another note, don't forget you can always do things like this... ;)

Yeah, he can do that but should he ? Assume you get a new project to maintain or add some new feature. Probably you (or the others ) expect a one entry point is assign to one controller. Then you can read logic of an application in the controller file.

16 Sep
2 years ago

ctomasz left a reply on Skip Route Group From Middleware

Of course, you will do what you want :-)

But to clarify - by implement strategy pattern at "the one controller" I think about something like this:


// your one special controller
class SpecialController extends BaseController
{
    private $implementation;

    public function __construct()
    {
        // put here your logic to choose of particular implementation, and assign to the attribute
        $this-implementation = new SpecjalLogic1;
    }

    public function someMethod()
    {
        return $this->implementation->someMethod();
    }
}



interface SpecialLogicInterface {
    public function someMethod();
}


class SpecialLogic1 implements SpecialLogicInterface
{
    public function someMethod()
    {
        // todo
    }
}

class SpecialLogic2 implements SpecialLogicInterface
{
    public function someMethod()
    {
        // todo
    }
}

ctomasz left a reply on Relationship Not Returning Fields

This is old database structure for Prestashop - but I think it will be some kind of inspiration for you.

At graph you can see relations between models and what kind of data should belong to particular model.

https://www.prestashop.com/blog/en/a-new-physical-data-model-available-for-prestashop/

ctomasz left a reply on Skip Route Group From Middleware

You do not need 5 different controllers but 5 different implementations of behavior for those entry points in one controller ( strategy pattern)

ctomasz left a reply on Shared Database Between 2 Applications

You can find solution(idea) of your problem in this article: http://fideloper.com/laravel-multiple-database-connections

But you should consider build small API to communicate between those applications.

ctomasz left a reply on Passing Variable Back When Form Submitted (5.3)

In this case, you should use session::flash ; Errors messages and "old inputs" are storage in session for next request( when you use redirect in this case - you force some kind of new request).

15 Sep
2 years ago