public function resolveRouteBinding($value)
    {
        if (! (ctype_digit($value) || is_int($value))) {
            return null;
        }

        try {
            $value = App::make('fakeid')->decode((int) $value);
        } catch (Exception $e) {
            return null;
        }

        return $this->where($this->getRouteKeyName(), $value)->first();
    }
public function resolveRouteBinding($value)
    {
        if (! (ctype_digit($value) || is_int($value))) {
            return null;
        }

        try {
            $value = App::make('fakeid')->decode((int) $value);
        } catch (Exception $e) {
            return null;
        }

        return $this->where($this->getRouteKeyName(), $value)->first();
    }
public function resolveRouteBinding ( $ value ) { if ( ! ( ctype_digit ( $ value ) || is_int ( $ value ) ) ) { return null ; } try { $ value = App :: make ( 'fakeid' ) -> decode ( ( int ) $ value ) ; } catch ( Exception $ e ) { return null ; } return $ this -> where ( $ this -> getRouteKeyName ( ) , $ value ) -> first ( ) ; }
Retrieve model for route model binding

@param  mixed  $value
@return \Illuminate\Database\Eloquent\Model|null
Retrieve model for route model binding