Laravel AdminLTE - How to call method and use its data in view

Laravel AdminLTE - How to call method and use its data in view

I am using Laravel AdminLTE and I have it all configured, there is just one part I do not understand. I made my route like so:

I am using Laravel AdminLTE and I have it all configured, there is just one part I do not understand. I made my route like so:

Route::get('/admin/painlevel', function () {
    return view('painlevel');
});

and I have this method in app/Http/Controllers/v1/PainLevelController.php

public function index()
{
     return PdTpainlevel::select('pkpainlevel as id', 'painlevel_name as name')->get();
}

How would I call that method and display the data in my painlevel view?

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Clear Cache in Laravel 6.8 App using Artisan Command Interface (CLI)

In Laravel 6 tutorial, we learn how to use PHP artisan command interface (CLI) to clear the cache from Laravel 6.8 application. How To Clear Cache in Laravel 6.8 Application using Artisan Command Line Interface (CLI)? How to clear route cache using php artisan command? How to easily clear cache in Laravel application? How to clear config cache in PHP Laravel via artisan command? How to clear Laravel view cache? How to Reoptimized class in Laravel via artisan CLI?

Get Weather Data with Laravel Weather

Get Weather Data with Laravel Weather. Laravel Weather is a good package which we can use to get weather data. It's a wrapper around Open Weather Map API (Current weather). A wrapper around Open Weather Map API (Current weather)

Laravel Sweet Alert | How to use the SweetAlert package in Laravel PHP

Sweet Alert is a laravel wrapper around #sweetalert javascript library for showing alert or notification message. This is a great package created by rashid, and this laravel package is very famous because it has tonnes of features you can choose from.