usmanali0458

Experience

90

0 Best Reply Awards

  • Member Since 1 Month Ago
  • 0 Lessons Completed
  • 0 Favorites

17th October, 2017

usmanali0458 left a reply on Menu Controller Is Not Found Laravel 5.5.check My Code Please And Help Me Where Am Wrong • 1 month ago

thanks every one . error was that i have not import use App\Menu;

usmanali0458 left a reply on Menu Controller Is Not Found Laravel 5.5.check My Code Please And Help Me Where Am Wrong • 1 month ago

please guid me how i can update the question with the correct format @carban

usmanali0458 left a reply on Menu Controller Is Not Found Laravel 5.5.check My Code Please And Help Me Where Am Wrong • 1 month ago

here is error

(1/1) FatalThrowableError Class 'App\Http\Controllers\Menu' not found in MenuController.php (line 18) at MenuController->menu() at call_user_func_array(array(object(MenuController), 'menu'), array()) in Controller.php (line 55)

usmanali0458 started a new conversation Menu Controller Is Not Found Laravel 5.5.check My Code Please And Help Me Where Am Wrong • 1 month ago

check my code please and help me where am wrong. am try to get date from Menu and SubMenu table using Eloquent model instead of join etc. my Menucontroller

class MenuController extends Controller { // Where ever you want your menu public function menu() {

    $menu = Menu::all()->load('submenu');

return view('menu',compact('menu'));
}

} my menu Model is

use Illuminate\Database\Eloquent\Model; class Menu extends Model {

public function submenu()
{
    return $this->hasMany(SubMenu::class);
}

} my submenu model is

use Illuminate\Database\Eloquent\Model; class SubMenu extends Model { public function menu() { return $this->belongsTo(Menu::class); } }

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.