Refactor method names/views for Contacts
This commit is contained in:
parent
5edb495bcb
commit
4af305ba3b
4 changed files with 6 additions and 6 deletions
|
@ -12,7 +12,7 @@ class ContactsController extends Controller
|
||||||
*
|
*
|
||||||
* @return \Illuminate\View\Factory view
|
* @return \Illuminate\View\Factory view
|
||||||
*/
|
*/
|
||||||
public function showAll()
|
public function index()
|
||||||
{
|
{
|
||||||
$filesystem = new Filesystem();
|
$filesystem = new Filesystem();
|
||||||
$contacts = Contact::all();
|
$contacts = Contact::all();
|
||||||
|
@ -25,7 +25,7 @@ class ContactsController extends Controller
|
||||||
'/assets/profile-images/default-image';
|
'/assets/profile-images/default-image';
|
||||||
}
|
}
|
||||||
|
|
||||||
return view('contacts', compact('contacts'));
|
return view('contacts.index', compact('contacts'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -33,7 +33,7 @@ class ContactsController extends Controller
|
||||||
*
|
*
|
||||||
* @return \Illuminate\View\Factory view
|
* @return \Illuminate\View\Factory view
|
||||||
*/
|
*/
|
||||||
public function showSingle($nick)
|
public function show($nick)
|
||||||
{
|
{
|
||||||
$filesystem = new Filesystem();
|
$filesystem = new Filesystem();
|
||||||
$contact = Contact::where('nick', '=', $nick)->firstOrFail();
|
$contact = Contact::where('nick', '=', $nick)->firstOrFail();
|
||||||
|
@ -44,6 +44,6 @@ class ContactsController extends Controller
|
||||||
:
|
:
|
||||||
'/assets/profile-images/default-image';
|
'/assets/profile-images/default-image';
|
||||||
|
|
||||||
return view('contact', ['contact' => $contact]);
|
return view('contacts.show', ['contact' => $contact]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,8 +118,8 @@ Route::group(['domain' => config('url.longurl')], function () {
|
||||||
Route::post('webmention', 'WebMentionsController@receive');
|
Route::post('webmention', 'WebMentionsController@receive');
|
||||||
|
|
||||||
//Contacts
|
//Contacts
|
||||||
Route::get('contacts', 'ContactsController@showAll');
|
Route::get('contacts', 'ContactsController@index');
|
||||||
Route::get('contacts/{nick}', 'ContactsController@showSingle');
|
Route::get('contacts/{nick}', 'ContactsController@show');
|
||||||
|
|
||||||
//Places
|
//Places
|
||||||
Route::get('places', 'PlacesController@index');
|
Route::get('places', 'PlacesController@index');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue