jobcerto

jobcerto

Member Since 3 Years Ago

Experience Points
155,860
Total
Experience

4,140 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
1516
Lessons
Completed
Best Reply Awards
7
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 32
155,860 XP
Jul
11
3 months ago
Activity icon

Replied to Filtering Through Array Data In Laravel Controller

Change the first where to whereIn and remove the =. Now the search will filter using the array of ids ($test in your case)

Aug
22
1 year ago
Activity icon

Started a new conversation Using An Select Field To Populate Another Table

In Laravel nova, i have the following field in an App\Nova\Group resource:


Select::make('Situação', 'status')->options([
    'Público' => 'Público', 
    'Privado' => 'Privado', 
     'Secreto' => 'Secreto'
 ])

It works fine, bug when i want to save using a observer, it throws the "unknown" "status" column.

This error happens because i don't have the given field on database, so is there anyway to remove an column already assigned from $attributes of the model in a observer?

One little exemple:


$fillable = ['foo', 'bar'];

In $model->fill(['foo' => 'value', 'bar' => 'value', 'baz' => 'value']);

How can I remove the baz from the list on the observer?

Thanks

May
12
1 year ago
Activity icon

Replied to What Folder Should I Use To Extend The PasswordBroker Class Which Is In The Laravel\vendor Folder?

maybe something like: App\Overrides\Auth\PasswordBroker::class

Mar
31
1 year ago
Activity icon

Replied to Multi Tentant With Admin Area

Lol, hahaha

Activity icon

Started a new conversation Multi Tentant With Admin Area

I know how to create a multi tenant (multi database) application. But now my client needs an area with information about all companies (each company use one separate database).

is there a package that can filter data from multiple databases at the same time?

Nov
30
1 year ago
Activity icon

Replied to How Do You Deal With Duplicated Frontend Views?

Ah, this is a small one, but i have a lot of huge compontens: This component i use in many places, but hide things, remove things, edit internal views for add uggly ifs for hide contents are gross..


<div class="card">
  <div class="card-header pt-0 pb-0 pl-0">
    @include('assessments.tasks.atoms.header')

    @if (Route::is('assessments.tasks.index'))
    <a class="btn btn-xs btn-light" href="{{ route('assessments.tasks.index', $assessment) }}">Ver plano de ação</a>
    @endif
  
    @include('assessments.tasks.atoms.actions')

  </div>

  
  <table class="table table-responsive table-striped table-lg v-center">
    <thead>
      <tr class="bg-secondary">
        <th class="w-60px">#</th>
        <th>Tarefa</th>
        <th>Prazo</th>
        <th>Situação</th>
        <th class="text-right w-150px">Ação</th>
      </tr>
    </thead>
    <tbody>
      @foreach ($tasks as $task)
      @include('assessments.tasks.atoms.task', ['task' => $task])
    @endforeach
  </tbody>
</table>

</div>


Activity icon

Started a new conversation How Do You Deal With Duplicated Frontend Views?

I have a big project, and many components are almost de same (just hide or show actions, or change positions, maybe an style or two).

How do you deal with this duplicated views? It feels gross to copy and paste here and there.

Examples:


<!-- Small widget -->
<div class="col-6 col-lg-3">
  <div class="card card-body text-center bg-primary">
    <div class="fs-40 fw-100">+100</div>
    <div>Article</div>
  </div>
</div>


<!-- same small widget, but change color and hide content -->
<div class="col-6 col-lg-3">
  <div class="card card-body text-center bg-info">
    <div>Article</div>
  </div>
</div>

Just include are not enough for me:

  @include('dashboard.atoms.assessments', ['assessments' => $dashboard->assessments()])

Pass a lot of variables is gross.

Is there an packaga that handler this type of things?

Aug
28
2 years ago
Activity icon

Replied to My AJAX Post Contains The Correct Token Header But I Still Get A TokenMismatchException

 Route::get('foo',
$http.post('/admin/foo').

the correct is $http.get right?

Aug
15
2 years ago
Activity icon

Replied to Dynamically Populating Dropdown In Laravel 5.4

From what I realized just do it like this:

@foreach($citiesDropDown as $id => $name)
<option value="{{$id }}" >{{$name}}</option>

@endforeach

Jun
14
2 years ago
Activity icon

Replied to MethodNotAllowedHttpException

the form action is wrong. Chance the .create to .store

Activity icon

Replied to How Can We Share Data Among Controllers "NOT VIEWS"

just put your data on the Helpers.php, then call your function. By the way, there's a auth() helper.

May
14
2 years ago
Activity icon

Replied to Error In PostContact Function

You make the array with = but the correct way is =>


$data = array(
        'name' => $request->name ,
        'email' => $request->email ,
        'bodyMessage' => $request->message
    );
    

May
06
2 years ago
Activity icon

Started a new conversation How To Scheduler An Job Class?

Hello, I have a job and would like to run it sometime in the future. How would I do to run the $this->dispach (MyJob) command using Schedulling tasks (cron job)?

Activity icon

Started a new conversation How To Scheduler An Job Class?

Hello, I have a job and would like to run it sometime in the future. How would I do to run the $this->dispach (MyJob) command using Schedulling tasks (cron job)?

Apr
27
2 years ago
Apr
22
2 years ago
Activity icon

Replied to Sending Mail

use Mail;

Apr
19
2 years ago
Activity icon

Replied to Resource Route With Slashes In Uri

// admin/settings/create, admin/settings/1/edit

Route::group(['prefix' => 'admin', 'as' => 'admin.'], function () {

    Route::resource('settings', 'SettingController');

});

// settings/create, settings/1/edit
Route::resource('settings', 'SettingController');

After this try an php artisan route:list

Activity icon

Replied to Resource Route With Slashes In Uri

hi @tio, if you put Route::resource('settings', 'SettingController'); outside the group it work's fine! Then yo can access /admin/settings and settings/ and this two routes will use all methods of SettingController;

Activity icon

Replied to Resource Route With Slashes In Uri

@tio,

Route::group(['prefix' => 'admin', 'as' => 'admin.'], function () {

    Route::resource('settings', 'SettingController');
});

With this you have /admin/settings/create, /admin/settings/{id} and your route names is admin.settings.create, admin.settings.show

Apr
14
2 years ago
Activity icon

Replied to Form Redirect To Antother Create Method Keeps Url Of Last

Nested routes works for me even at 5.4.

If a clientId not exists, an exception will be thrown.

In your store method just check if the user can make that request.

Activity icon

Replied to Form Redirect To Antother Create Method Keeps Url Of Last

@patrykszady , why not change your route to:

Route::resource('clients.projects', 'ProjectsController');

Then in ProjectsController you have:

public function create(Client $client)
{

return view('clients.projects.create', compact('client'));

}

In your ClientController you have:

public function store(Request $request)
{
    //Save client in database and associate it to a variable

    return redirect()->route('clients.projects.create', [$client->id]);

}

It is an nested resource route.. clients/54/projects/create...