Answers for "show table in database laravel"

CSS
1

get all tables laravel

$tables = DB::select('SHOW TABLES');
foreach($tables as $table)
{
      echo $table->Tables_in_db_name;
}
Posted by: Guest on June-28-2021
0

laravel show table columns

Schema::getColumnListing($table);
Posted by: Guest on October-29-2020
0

show data from a table in laravel 8

use Illuminate\Support\Facades\DB;

class UserController extends Controller
{
    public function index()
    {
        $users = DB::table('users')->select('id','name','email')->get();

        return view('some-view')->with('users', $users);
    }
}
Posted by: Guest on October-22-2020

Code answers related to "show table in database laravel"

Browse Popular Code Answers by Language