Spir

at Nantes, France

Experience

1,900

2 Best Reply Awards

  • Member Since 4 Years Ago
  • 51 Lessons Completed
  • 0 Favorites

3rd October, 2015

Spir left a reply on PHP7 Is Realy Realy Slow.... • 2 years ago

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.

10th June, 2015

Spir left a reply on Remove Stacktrace From Log Files • 3 years ago

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

7th March, 2015

Spir left a reply on Laracon EU • 3 years ago

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!

3rd March, 2015

Spir left a reply on [L5] PJAX With Laravel 5 • 3 years ago

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.

20th February, 2015

Spir left a reply on Debug Mode True Only For Admins • 3 years ago

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 • 3 years ago

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;
}),

2nd October, 2014

Spir left a reply on MySQL Gui Tool • 3 years ago

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

23rd September, 2014

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

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
}

16th September, 2014

Spir left a reply on Interfaces And Depedencies • 3 years ago

@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 • 3 years ago

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*/ }

15th September, 2014

Spir left a reply on Issue Tracker / Project Management • 3 years ago

https://app.asana.com/ is doing a great job IMHO

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.