Search
 
SCRIPT & CODE EXAMPLE
 

PHP

laravel query builder sum

$purchases = DB::table('transactions')
    ->join('categories', 'transactions.category_id', '=', 'categories.id')
    ->where('categories.kind', '=', 1)
    ->sum('transactions.amount');
Comment

PREVIOUS NEXT
Code Example
Php :: phpmyadmin first login 
Php :: laravel old request 
Php :: sort laravel eloquent 
Php :: laravel join table 
Php :: php create zip from folder 
Php :: get the url without the query string php 
Php :: fetch row in php 
Php :: php pi() function 
Php :: ob_start in php 
Php :: google translate api php 
Php :: How do I make a redirect in PHP? 
Php :: php isset ternary operator 
Php :: optimize clear laravel not working 
Php :: send mail test from laravel 
Php :: laravel 8 created at format 
Php :: Array and string offset access syntax with curly braces is no longer supported in C:xampphtdocse-examPHPExcelPHPExcelSharedString.php on line 529 
Php :: php header pdf 
Php :: showing php code in browser 
Php :: php number_format 
Php :: php get first 10 elements of array 
Php :: add column to migration laravel 
Php :: how set field after another field in migration in laravel 
Php :: install laravel in ubuntu 20.04 
Php :: Barcode generator example using milon/barcode in laravel 
Php :: php remove stop words from string 
Php :: <?php echo do_shortcode(); ? with variable 
Php :: get current month records in laravel 
Php :: password_hash 
Php :: twig is in string 
Php :: Larvel Print last query 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =