argument('name'); if (!file_exists(base_path('app\\Services\\'.$fileName.'.php'))){ file_put_contents(base_path('app\\Services\\'.$fileName.'.php'), 'error("ERROR: file exists;"); } }