mardi 13 février 2018

Fetching data from Database in Laravel

I want to fetch data from database table named 'users' and display the output in a table.

I have written below code but it's not working.

I am using Laravel 5.5

"

@extends('layouts.app')

@section('content')

Admin Panel

Data of the Registered Users.

Id Name Email $users = DB::table('users')->select('id','name','email')->get(); @foreach($users as $value) @endforeach

@endsection

"

Error: Undefined Variable: users



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire