<?php
namespace App\Http\Controllers\Admin;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;
class AdminHomeController extends Controller
{
public function index()
{
return view('AdminHome')->withPages(Page::all());
}
}
when i press ctrL+s to save it ,then some code is deleted . I don't know why ,can you give me a solution ?
<?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
class AdminHomeController extends Controller {
public function index() {
return view('AdminHome')->withPages(Page::all());
}
}
the code become like this .
I installed packages for my sublime text 3 ,in the follow picture . I think it's caused by sublimeLinter , but I don't kow how to fix it , my user settings as follows: enter image description here
{
"user": {
"debug": false,
"delay": 0.15,
"error_color": "D02000",
"gutter_theme": "Packages/SublimeLinter/gutter-themes/Default/Default.gutter-theme",
"gutter_theme_excludes": [],
"lint_mode": "load/save",
"linters": {
"php": {
"@disable": false,
"args": [],
"excludes": []
},
"phplint": {
"@disable": false,
"args": [],
"excludes": []
}
},
"mark_style": "outline",
"no_column_highlights_line": false,
"passive_warnings": false,
"paths": {
"linux": [],
"osx": [],
"windows": [
"D:\\wamp64\\bin\\php\\php7.0.4"
]
},
"python_paths": {
"linux": [],
"osx": [],
"windows": []
},
"rc_search_limit": 3,
"shell_timeout": 10,
"show_errors_on_save": false,
"show_marks_in_minimap": true,
"syntax_map": {
"html (django)": "html",
"html (rails)": "html",
"html 5": "html",
"javascript (babel)": "javascript",
"magicpython": "python",
"php": "html",
"python django": "python",
"pythonimproved": "python"
},
"warning_color": "DDB700",
"wrap_find": true
}
}
This is the first time I ask question on this website ,and I am from China , my English is not very good .
your issue is reported before from phpfmt
users. under package settings-> phpfmt -> setting - User
then add "passes": ["OnlyOrderUseClauses"]
. have a look on this issue
update: the working format is "passes": "OnlyOrderUseClauses",
as @SHUIPING_YANG mentioned