Take a peak at the doc concerning Resource Controllers
https://laravel.com/docs/5.5/controllers#resource-controllers
Make sure your database is connected and setup in the .env file
Make sure a table like below exists and has some entries (keep using phpMyAdmin for this now, Look at migrations in the future):
products
- id
- name
- latin_name
Run the below in a terminal for the C in MVC
$ php artisan make:controller ProductController --resource
Find the created ProductController.php under app\Http\Controllers and edit the index function like so:
//make sure you include an import for the App\Product model class
public function index()
{
$products = Product::get();
return view('products.index')->with(compact($products));
}
Then add the line to your routing routes\web.php file
Route::resource('products', 'ProductController');
Run the below in a terminal for the M in MVC
$ php artisan make:model Product
Now make the View for the V in MVC by creating a file under resources\views\products (you need to make the products folder) called index.blade.php
<table>
@foreach($products as $product)
<tr><td>{{$product->name}} Latin:{{$product->latin_name}}</td></tr>
@endforeach
</table>
Now use a browser to browse to your Laravel Application like:
localhost/products
You often don't need to make 'raw queries' when using an ORM like Eloquent.
The Model is an abstraction to the database, the Controller is a store for the business logic which interacts with the Model which interacts with the database.
You should make a products database table and a Product model with a flag to say if its a fish or meat product.
It can seem daunting at first, but Laravel is a powerful tool that just needs some prior knowledge.
Good luck!