Answers for "laravel put data into column database select"

PHP
0

how to get data from a table in laravel

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
7

laravel not in query

DB::table(..)->select(..)->whereNotIn('book_price', [100,200])->get();
Posted by: Guest on September-26-2020
2

DB::table('users')->get();

DB::select('SELECT * FROM users WHERE name = ?', array(Input::get('name')));
Posted by: Guest on October-22-2020

Code answers related to "laravel put data into column database select"

Browse Popular Code Answers by Language