Search
 
SCRIPT & CODE EXAMPLE
 

PHP

get data from 2 table in response laravel

$p1 = DB::table('properties')
        ->where('address', 'test')
        ->select('name', 'address');

$p2 = DB::table('properties_x')
         ->where('address', 'test')
         ->select('name', 'address');

$p = $p1->unionAll($p2);

DB::table(DB::raw("({$p->toSql()}) AS p"))
->mergeBindings($p)
->select('name', 'address')
->paginate(10);
Comment

PREVIOUS NEXT
Code Example
Php :: Genrate Random number in php 
Php :: php regex replace to remove special characters and accented 
Php :: PHP MySQL Use The ORDER BY Clause 
Php :: wp php category page count products 
Php :: como destruir uma variavel de sessão 
Php :: how to get all the records with same ID in laravel 
Php :: internal server error phpmyadmin 
Php :: declare variable in php class 
Php :: wordpress post autosave time 
Php :: laravel the requested url was not found on this server 
Php :: php check image size before upload 
Php :: setcookie in php 
Php :: validation laravel 
Php :: php array access by key 
Php :: faker image laravel 8 
Php :: how to insert data in table and fetch in wordpress 
Php :: php undefined index meaNING 
Php :: PHP strtolower — Make a string lowercase 
Php :: laravel collection sum 
Php :: symfony messenger route 
Php :: start php cli 
Php :: laravel model::query 
Php :: find php ini 
Php :: laravel api cors localhost issue 
Php :: laravel exclude field 
Php :: laravel default encryption mode 
Php :: utc time php 
Php :: Write a Multiplication program of two numbers in php using operator 
Php :: xampp php 5.6 download 64 bit 
Php :: object of class stdclass could not be converted to string php laravel 
ADD CONTENT
Topic
Content
Source link
Name
8+2 =