Spir

Spir

at Nantes, France

Nantes, France

Member Since 4 Years Ago

Experience Points 1,900
Experience
Level
Lessons Completed 51
Lessons
Completed
Best Reply Awards 2
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.

03 Oct
3 years ago

Spir left a reply on PHP7 Is Realy Realy Slow....

Hi, you can also track what is slowing down with blackfire: https://blackfire.io/ It should be already installed on Homestead. You just have to set your token I think.

10 Jun
3 years ago

Spir left a reply on Remove Stacktrace From Log Files

What is your Laravel version? if it is L5 then you can make some change to App\Exceptions\Handler Read more here: http://laravel.com/docs/5.0/errors

07 Mar
3 years ago

Spir left a reply on Laracon EU

I'll be there this year again. Like Jeffrey I was there for the first one only. Couldn't make it last year. First conf was awesome, great place, great people. See you there!

03 Mar
3 years ago

Spir left a reply on [L5] PJAX With Laravel 5

Hi, the description is short, but it says that you have to define the container in the PJAX header request I'm not sure but I think if you have something like this:

$(document).pjax('a', '#pjax-container')

Then your laravel response will automatically serve only what's inside that container as a response. So you bascially only have to drop the JS lib: https://github.com/defunkt/jquery-pjax

Configure the PJAX Laravel 5 as described in the doc : https://github.com/JacobBennett/pjax

Set you JS to activate the PJAX on the sector. and that's it.

20 Feb
3 years ago

Spir left a reply on Debug Mode True Only For Admins

I used to enable debug only if from a set of IP on some dev env I was using:

'debug' => value(function(){
    if (in_array(Illuminate\Support\Facades\Request::getClientIp(), [192.0.0.1, 192.0.0.2]))
    {
        return true;
    }
    
    return false;
}),

If you enable debug in production you should be pretty sure of what you do!

Spir left a reply on Debug Mode True Only For Admins

Not sure if it fits for you but here is a possilbe solution. Do this in your config file:

'debug' => value(function(){
    // load your user
    if ($currentUser->level(10))
    {
        return true;
    }       
    return false;
}),
02 Oct
4 years ago

Spir left a reply on MySQL Gui Tool

+1 for workbench. I'm using it on linux and it works like a charm.

23 Sep
4 years ago

Spir left a reply on Guzzle\Http\Message\Request::getBody() Not Found When Used With Artisan Command

I'm using Guzzle in command without any issue. I suggest you debug a bit more. Use a try / catch to see exception detail and also check the response' status:

$client = new Client();
try
{
    $response = $client->get( $feed->url );
    if ($response->getStatusCode()==200)
    {
        $scraper = new Scraper( $response->getBody() );
    }
}
catch(Exception $e)
{
    // learn more about that exception
}
16 Sep
4 years ago

Spir left a reply on Interfaces And Depedencies

@ThibaudDauce, yes you can do both so you can check that the implementation of the Model interface is an Eloquent one.

Spir left a reply on Interfaces And Depedencies

Hi @ThibaudDauce, If you really need to cast the parameters then maybe you should make an interface for you model and use that interface as a cast. I would rather remove the cast to simplify and if you really want to be sure you pass a EloquentCar (in the Eloquent implementation) make the check in the Repository implementation.

Example:

public function save($car)
{
    if (!($car instanceof EloquentCar))
    {
        throw new InvalidArgument('The argument is not a valid eloquent car');
    }
}

Or if you make an interface for all your model (Eloquent, Mongo...):

public function save(Car $car);

With :

interface Car { /*TODO*/ }
15 Sep
4 years ago