public function getBySlug($slug)
    {
        $model = $this->createLocationModel();
        $query = $this->createLocationModelQuery();
        $location = $query->where($model->getSlugKeyName(), $slug)->first();

        return $location ?: null;
    }
public function getBySlug($slug)
    {
        $model = $this->createLocationModel();
        $query = $this->createLocationModelQuery();
        $location = $query->where($model->getSlugKeyName(), $slug)->first();

        return $location ?: null;
    }
public function getBySlug ( $ slug ) { $ model = $ this -> createLocationModel ( ) ; $ query = $ this -> createLocationModelQuery ( ) ; $ location = $ query -> where ( $ model -> getSlugKeyName ( ) , $ slug ) -> first ( ) ; return $ location ? : null ; }
Retrieve a location by their unique slug.

@param  string $slug

@return \Igniter\Flame\Location\Contracts\LocationInterface|null
Retrieve a location by their unique slug .