Answers for "latest in laravel"

PHP
7

laravel not in query

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

laravel sql query

use Illuminate\Support\Facades\DB;

$users = DB::select('select * from users');

foreach ($users as $user) {
    echo $user->name;
}
Posted by: Guest on January-07-2021
0

laravel latest

public function activity()
        {
            return $this->hasMany('App\Activity')
                ->with(['user', 'subject'])
                ->latest()->get();
        }
Posted by: Guest on June-30-2021

Browse Popular Code Answers by Language