My url is like this : http://localhost/mysystem/public/users/index/2016
I want to get 2016, because I need it. But, I'm confused
Is there any people who can help me?
In your previous question I can see this method:
public function store(CreateUserRequest $request)
And your route should look like this (partially taken from previous answer too):
Route::get('users/store/{year}', 'UserController@store')->name('users.store.year');
Note, that if you'll build store method with Route::resource(), you'll not be able to pass year through URL.
So, to make it work you need to set route and to change method to this:
public function store(CreateUserRequest $request, $year)
$year variable will have 2016 value.
To get 2016, you can use $year = Request::segment(3);.
Non-static method Illuminate\Http\Request::segment() should not be called statically