patrickmaciel

patrickmaciel

Member Since 4 Years Ago

Uberlândia

Full Stack Developer at Vine Solutions

Experience Points 1,930
Experience Level 1

3,070 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 48
Lessons
Completed
Best Reply Awards 0
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.

17 May
1 week ago

patrickmaciel left a reply on Composer Laravel Installer Permission Denied On Windows 10

And happening again =( Man... in my old Macbook works great.... now in Windows 10, dear lord. I dont know what to do. Look that:

PS C:\Users\patri\www\recrutei\ciee\recrutei_mvc_api> composer update -vvv
Reading C:/Users/patri/AppData/Roaming/Composer/composer.json
Loading config file C:/Users/patri/AppData/Roaming/Composer/composer.json
Checked CA file C:\Users\patri\AppData\Local\Temp\ope779B.tmp: valid
Executing command (C:/Users/patri/AppData/Roaming/Composer): git branch --no-color --no-abbrev -v
Executing command (C:/Users/patri/AppData/Roaming/Composer): git describe --exact-match --tags
Executing command (C:/Users/patri/AppData/Roaming/Composer): git log --pretty="%H" -n1 HEAD
Executing command (C:/Users/patri/AppData/Roaming/Composer): hg branch
Executing command (C:/Users/patri/AppData/Roaming/Composer): fossil branch list
Executing command (C:/Users/patri/AppData/Roaming/Composer): fossil tag list
Executing command (C:/Users/patri/AppData/Roaming/Composer): svn info --xml
Reading C:/Users/patri/AppData/Roaming/Composer/composer.json
Loading config file C:/Users/patri/AppData/Roaming/Composer/composer.json
Reading C:/Users/patri/AppData/Roaming/Composer/vendor/composer/installed.json
Reading C:/Users/patri/AppData/Roaming/Composer/vendor/composer/installed.json
Running 1.8.5 (2019-04-09 17:46:47) with PHP 7.2.18 on Windows NT / 10.0
Reading C:/Users/patri/AppData/Roaming/Composer/composer.json
Loading config file C:/Users/patri/AppData/Roaming/Composer/composer.json
Executing command (C:/Users/patri/AppData/Roaming/Composer): git branch --no-color --no-abbrev -v
Executing command (C:/Users/patri/AppData/Roaming/Composer): git describe --exact-match --tags
Executing command (C:/Users/patri/AppData/Roaming/Composer): git log --pretty="%H" -n1 HEAD
Executing command (C:/Users/patri/AppData/Roaming/Composer): hg branch
Executing command (C:/Users/patri/AppData/Roaming/Composer): fossil branch list
Executing command (C:/Users/patri/AppData/Roaming/Composer): fossil tag list
Executing command (C:/Users/patri/AppData/Roaming/Composer): svn info --xml
Reading C:/Users/patri/AppData/Roaming/Composer/composer.json
Loading config file C:/Users/patri/AppData/Roaming/Composer/composer.json
Reading C:/Users/patri/AppData/Roaming/Composer/vendor/composer/installed.json
Reading C:/Users/patri/AppData/Roaming/Composer/vendor/composer/installed.json
Composer could not find the config file: C:\Users\patri\AppData\Roaming\Composer\vendor
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
16 May
1 week ago

patrickmaciel left a reply on Composer Laravel Installer Permission Denied On Windows 10

Guys, after hours and hours trying to solve that problem... I install and reinstall 20 times or more, but nothing solve.

But, after some attempts, just worked.

I dont know what happen, serioulsy.

patrickmaciel left a reply on Composer Laravel Installer Permission Denied On Windows 10

@DIEGOAURINO - yes, I already do that. But the error was gone after 3 hours doing the same command... Im think is a problem in the package repositories... I dont know, it's really gone and the only thing I do is, install and reinstall 20 times.

patrickmaciel left a reply on Composer Laravel Installer Permission Denied On Windows 10

@JLRDW - Im using the windows installer version.

15 May
1 week ago

patrickmaciel started a new conversation Composer Laravel Installer Permission Denied On Windows 10

Hi guys how are you? Tody I start work on Windows 10 again (previous was MacOS High Sierra). And when I tried execute the command composer global require laravel/installer I received the following error:

Changed current directory to C:/Users/patri/AppData/Roaming/Composer


  [ErrorException]
  file_put_contents(C:\Users\patri\AppData\Roaming\Composer\vendor): failed to open stream: Permission denied


require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--update-with-all-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...
20 Dec
5 months ago

patrickmaciel left a reply on Why And When Use Services And Repositories

@D9705996 - I understand you. In the last 3 years I use the "core functions" of Laravel to make websites, systems and APIs. But when I analyze the code I see "the same code, again and again", or I'm using to much helpers for "service things".

So... my code works. That's important in the first time. But after that, for maintenance, it got really bad. Because that Im starting search for Repositories, Services, Factory, etc.

I do not want to lose the productivity I have in Laravel and not complicate things too much, but I mainly want to facilitate the reuse of codes.

patrickmaciel left a reply on Why And When Use Services And Repositories

@SERGIU17 - Understood. Excellent examples.

patrickmaciel started a new conversation Why And When Use Services And Repositories

This is my eternal doubt.

I see some devs using Repositories only for CRUD operations, so anything beyond that I need to put where?

We also have the Services, which we can put anything, or not?

My other question is, how to use both:

  • in controller construct
  • in function method as a parameter
  • just using "new etc( );"

patrickmaciel left a reply on Where Are You All From?

Uberlândia - MG - Brazil

15 Jul
3 years ago

patrickmaciel left a reply on How To Relate A Pivot Field In A BelongsToMany Relationship

I partially understand your answer, So... what I need to do? (code)

  • Create a CreatedUser model?
  • This model belongsTo customer, user and the user who created it
  • Then how can I connect to my Customer/User for use like that: $user->customer[0]->createdUser->name or $user->customer[0]->pivot->createdUser->name

Anyway, thanks.

patrickmaciel started a new conversation How To Relate A Pivot Field In A BelongsToMany Relationship

Actually I have this situation:

  • 1 user belongs to many customers
  • In this relationship - customers_users - I need to save created_user_id ie, who create this relationship.

public function customers()
{
    return $this->belongsToMany('Project\DB\Customer', 'customers_users')
        ->withPivot('created_user_id');
}

How can I relate this extra field in my Eloquent model? I need to access that information like this:

@foreach ($user->customers => $customer)
    {!! $customer->createdUser->name !!}
@endforeach

The only way I make it work, was making a manually join, but I want to do that using the eloquent.

If you need more information, tell me.

Se precisarem de mais informações me avisem.

09 Apr
4 years ago

patrickmaciel started a new conversation Eloquent And Query Builder "with (nolock)"

Hi folks!

I have some throuble because my queries not have with (nolock) instruction after from clause.

Because that, some queries lock the database and then nobody can use the system.

How to use with (nolock) with Eloquent & Query Builder?