src/Commands/MakeEloquentFilter.php
public function makeClassName()
    {
        $parts = array_map('studly_case', explode('\\', $this->argument('name')));
        $className = array_pop($parts);
        $ns = count($parts) > 0 ? implode('\\', $parts).'\\' : '';

        $fqClass = config('eloquentfilter.namespace', 'App\\ModelFilters\\').$ns.$className;

        if (substr($fqClass, -6, 6) !== 'Filter') {
            $fqClass .= 'Filter';
        }

        if (class_exists($fqClass)) {
            $this->error("\n\n\t$fqClass Already Exists!\n");
            die;
        }

        $this->setClassName($fqClass);

        return $this;
    }
public function makeClassName()
    {
        $parts = array_map('studly_case', explode('\\', $this->argument('name')));
        $className = array_pop($parts);
        $ns = count($parts) > 0 ? implode('\\', $parts).'\\' : '';

        $fqClass = config('eloquentfilter.namespace', 'App\\ModelFilters\\').$ns.$className;

        if (substr($fqClass, -6, 6) !== 'Filter') {
            $fqClass .= 'Filter';
        }

        if (class_exists($fqClass)) {
            $this->error("\n\n\t$fqClass Already Exists!\n");
            die;
        }

        $this->setClassName($fqClass);

        return $this;
    }
public function makeClassName ( ) { $ parts = array_map ( 'studly_case' , explode ( '\\' , $ this -> argument ( 'name' ) ) ) ; $ className = array_pop ( $ parts ) ; $ ns = count ( $ parts ) > 0 ? implode ( '\\' , $ parts ) . '\\' : '' ; $ fqClass = config ( 'eloquentfilter.namespace' , 'App\\ModelFilters\\' ) . $ ns . $ className ; if ( substr ( $ fqClass , - 6 , 6 ) !== 'Filter' ) { $ fqClass .= 'Filter' ; } if ( class_exists ( $ fqClass ) ) { $ this -> error ( "\n\n\t$fqClass Already Exists!\n" ) ; die ; } $ this -> setClassName ( $ fqClass ) ; return $ this ; }
Create Filter Class Name.

@return $this
Create Filter Class Name .