PabloT

PabloT

Member Since 4 Months Ago

Experience Points
8,440
Total
Experience

1,560 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
77
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start your 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-in-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 Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist 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,440 XP
Mar
15
2 weeks ago
Activity icon

Replied to Phpstom - Blade Comments

Nice Rodrigo.... thank you!

Mar
14
2 weeks ago
Activity icon

Started a new Conversation Phpstom - Blade Comments

Hi, anyone experiencing the same?

In a blade file I have:

    Banner comment
    <x-banner>
        https://picsum.photos/1920/600?random=1&blur=5
    </x-banner>

To comment "Banner comment" line I use Ctrl+/

In old versions of phpStorm I used to get:

    {{--Banner comment--}}
    <x-banner>
        https://picsum.photos/1920/600?random=1&blur=5
    </x-banner>

In phpStorm 2019.3 I get:

{{--    Banner comment--}}
    <x-banner>
        https://picsum.photos/1920/600?random=1&blur=5
    </x-banner>

Does anyone know how to fix this?

Thank you. Pablo

Feb
13
1 month ago
Activity icon

Replied to Laravel Routes - Best Practices.

Hi,

Following @amaury

I have updated my code to:

    //App
    Route::group(['prefix' => 'app'], function () {

        //Businesses
        Route::resource('businesses', 'App\BusinessController');

        //Businesses/Domains
        Route::get('businesses/{business}/domains/', ['as' => 'businesses.domains.index', 'uses' => 'App\[email protected]']);
        Route::resource('businesses.domains', 'App\BusinessDomainController', ['except' => ['index']]);

        //Businesses/Offices
        Route::get('businesses/{business}/offices/', ['as' => 'businesses.offices.index', 'uses' => 'App\[email protected]']);
        Route::resource('businesses.offices', 'App\BusinessOfficeController', ['except' => ['index']]);

        //Businesses/Offices/Members
        Route::get('businesses/{business}/offices/{office}/members', ['as' => 'businesses.offices.members.index', 'uses' => 'App\[email protected]']);
        Route::resource('businesses.offices.members', 'App\BusinessOfficeMemberController', ['except' => ['index']]);

    });

Still, this is something I don't get...

In a selected business page: (www.domain.com/businesses/hca-hospital/)

I have a link to hca-hospital's offices (www.domain.com/businesses/hca-hospital/offices/). This link point to my index method on my App\BusinessOfficeController, without implementing "except" => ['index] and having the 'get' route it doesn't work.

If anyone knows the reason why personally I would appreciate the explanation.

Activity icon

Replied to Laravel Routes - Best Practices.

Hi All, Thank you so much for all the advice, as always super professional.

Just a quick update...

I'm having this:

//App
Route::group(['prefix' => 'app'], function () {

    //Businesses
    Route::resource('businesses', 'App\BusinessController');

    //Businesses/Domains
    Route::get('businesses/{slug}/domains/', ['as' => 'businesses.domains.index', 'uses' => 'App\[email protected]']);
    Route::resource('businesses.domains', 'App\BusinessDomainController', ['except' => ['index']]);

    //Business/Offices
    Route::get('businesses/{slug}/offices/', ['as' => 'businesses.offices.index', 'uses' => 'App\[email protected]']);
    Route::resource('businesses.offices', 'App\BusinessOfficeController', ['except' => ['index']]);

    //Business/Members
    Route::get('businesses/{slug}/offices/{slug}/members', ['as' => 'businesses.offices.members.index', 'uses' => 'App\[email protected]']);
    Route::resource('businesses.offices.members', 'App\BusinessOfficeMemberController', ['except' => ['index']]);

});

The reason why I'm implementing the "get" routes is that when for example:

In a selected business page: (www.domain.com/businesses/hca-hospital/)

I have a link to hca-hospital's offices (www.domain.com/businesses/hca-hospital/offices/). This link point to my index method on my App\BusinessOfficeController, without implementing "except" => ['index] and having the 'get' route it doesn't work.

If anyone knows the reason why personally I would appreciate the explanation.

Feb
12
1 month ago
Activity icon

Started a new Conversation Laravel Routes - Best Practices.

Hi,

Please, I need some advice. I'm building up an app that the client requires the URLs to be as the following example:

//www.radar.com
//-URL when you are on: Commercial site.

//www.radar.com/app/
//-URL when you are on: The app (service).

//www.radar.com/app/businesses/
//-URL when you are on: List of registered business on user's account.

//www.radar.com/app/businesses/visit-london-ltd/
//-URL when you are on: A selected business

//www.radar.com/app/businesses/visit-london-ltd/offices/
//-URL when you are on: List of offices a business has.

//www.radar.com/app/businesses/visit-london-ltd/offices/south-path-office/
//-URL when you are on: A selected office.

//www.radar.com/app/businesses/visit-london-ltd/offices/south-path-office/staff-members
//-URL when you are on: List of staff members an office has.

//www.radar.com/app/businesses/visit-london-ltd/offices/south-path-office/staff-members/[email protected]
//-URL when you are on: A selected staff member.

I have the application working but the URL's are not as the client wants... So far I have this set.

//App
Route::group(['prefix' => 'app' ], function () {
    //Business
    Route::resource('businesses', 'App\BusinessController');
    Route::group(['prefix' => 'businesses' ], function () {
        Route::resource('offices', 'App\OfficeController');
        Route::resource('members', 'App\MemberController');
    });
});
    

I would like to have the application following best practices/conventions, any advice? Thank you.

Feb
10
1 month ago
Activity icon

Replied to Model Names

Hi all,

Thank you so much for all the replies.

I think I have to clarify that I need two tables to store the data. One to hold the public stuff like gender, ethnicity, etc. The second table holds private details such as dob, mobile number, etc.

My question was originated since I had the models named differently and just to have things a bit more ordered I decided to rename the models PublicProfile and PrivateProfile. Guess what...? all when broken! I thought it was because of the new model names. I was wrong, the issue was on my routes! Finally, I have named my models Private and Personal just to keep the app clean and simple.

Thank you all guys... happy coding...

Feb
07
1 month ago
Activity icon

Started a new Conversation Model Names

Can I name two models like:

PublicProfille PrivateProfile

I'm I following good practice? Will all work fine?