public function bySlug($slug, $attributes = ['*'])
    {
        $model = $this
            ->findBy('slug', $slug, $attributes);

        if (is_null($model)) {
            abort(404);
        }

        return $model;
    }
public function bySlug($slug, $attributes = ['*'])
    {
        $model = $this
            ->findBy('slug', $slug, $attributes);

        if (is_null($model)) {
            abort(404);
        }

        return $model;
    }
public function bySlug ( $ slug , $ attributes = [ '*' ] ) { $ model = $ this -> findBy ( 'slug' , $ slug , $ attributes ) ; if ( is_null ( $ model ) ) { abort ( 404 ) ; } return $ model ; }
Get single model by Slug where status = 1.

@param string $slug
@param array  $attributes

@return mixed
Get single model by Slug where status = 1 .