danielcoimbra

danielcoimbra

Member Since 5 Years Ago

Experience Points 25,285
Experience
Level
Lessons Completed 501
Lessons
Completed
Best Reply Awards 1
Best Answer
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.

11 Aug
3 months ago

danielcoimbra left a reply on Vue Powered Collapsable Sidebar Menu

I made a side menu using Vue.js for a project some time ago. You can find the Vue Side Menu GitHub repository here. For reference, maybe it can help others trying to find similar examples in the future.

09 Feb
9 months ago

danielcoimbra left a reply on Homestead - Wrong Time

Try these steps:

1 - vagrant ssh (into Homestead VM)

2 - sudo dpkg-reconfigure tzdata (and choose your region)

21 Dec
10 months ago

danielcoimbra left a reply on How Can I Get Domain Name Used To Visit An App?

request()->getHost();

From Laravel Docs: "The Illuminate\Http\Request instance provides a variety of methods for examining the HTTP request for your application and extends the Symfony\Component\HttpFoundation\Request class."

The Symfony\Component\HttpFoundation\Request has a method getHost() as described here: http://api.symfony.com/3.0/Symfony/Component/HttpFoundation/Request.html#method_getHost

26 Feb
1 year ago

danielcoimbra left a reply on Is There A Way To Remove "Connected To Browser Sync" Notification From Laravel Mix Browsersync?

The recommended way, is to disable notifications:

mix.browserSync({
    proxy: 'my-domain.dev',
    files: ['public/css/*.css', 'public/js/*.js'],
    notify: false
});
09 Feb
1 year ago

danielcoimbra left a reply on Resize An Image Before Upload To S3

My working code is:

$file = request()->file('my_input_file_name');

$imageName = $file->getClientOriginalName();

$img = Image::make($file);

$img->resize(null, 1000, function ($constraint) {
    $constraint->aspectRatio();
});

//detach method is the key! Hours to find it... :/
$resource = $img->stream()->detach();

$path = Storage::disk('s3')->put(
    'my-s3-folder/' . $imageName,
    $resource
);

danielcoimbra left a reply on Saving An Intervention Image Instance Into Amazon S3

My working code is:

$file = request()->file('my_input_file_name');

$imageName = $file->getClientOriginalName();

$img = Image::make($file);

$img->resize(null, 1000, function ($constraint) {
    $constraint->aspectRatio();
});

//detach method is the key! Hours to find it... :/
$resource = $img->stream()->detach();

$path = Storage::disk('s3')->put(
    'my-s3-folder/' . $imageName,
        $resource
);
21 Sep
2 years ago

danielcoimbra left a reply on Submit Serialized Form Data With Vue

Here is the solution:

let myForm = document.getElementById('myForm');

var formData = new FormData(myForm);

//if necessary...
formData.append('foo', 'bar'); 

this.$http.post('/api', formData);
10 May
2 years ago

danielcoimbra left a reply on HasManyThrough With Only Two Models

Hi! Look at belongsToMany relationship... It's what you are looking for. See: https://github.com/laravel/framework/issues/441#issuecomment-14213883

19 Mar
3 years ago

danielcoimbra left a reply on Using Laravel Auth For Multiple Tables

As at the moment the package have not been ported to Laravel 5, I'm using Laravel 5 native auth to handle multiple tables...

It's not difficult, please check this Gist:

https://gist.github.com/danielcoimbra/64b779b4d9e522bc3373

Daniel