Ich erstelle ein Projekt namens Doctor Management System. Ich bin jetzt in diesem stecken, dass, wenn ein Benutzer seine Seite anmeldete, meine Wegfunktion die spezifische Identifikation erhält & dann seine Informationen zeigen. Aber als ich mich anmeldete, bekam ich keine ID &, deshalb hat es einen Fehler gemacht, aber wenn ich manuell die ID eingegeben habe, hat es perfekt funktioniert. Ich habe nicht gefunden, warum das passiert. Bitte Jungs, hilf mir.Route ID Funktioniert nicht
Meine Strecke Datei
Route::group([
'middleware' => 'auth'
], function() {
Route::get('/home/{profile_id}', [
'as' => 'admin',
'uses' => '[email protected]'
]);
Route::get('/profile/{profile_id}', array('as' =>'profile' ,'uses' => '[email protected]'));
Mein Profil Controler ist
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use App\User;
class ProfileController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index($profile_id)
{
$profile = User::find($profile_id);
// if(!$profile) {
// return redirect()->route('logout')->with(['fail' => 'Profile Not Found']);
// }
return view('admin.article.index',['profile' => $profile]);
}
Tnx für Ihre Hilfe. Es löst mein Problem –
Gern geschehen! – harrysbaraini
Wie aktualisiere ich Informationen in meiner Profildatei mit dieser Notation? –