Horje
laravel tips Code Example
laravel tips
$q->where(function ($query) {
    $query->where('gender', 'Male')
        ->where('age', '>=', 18);
})->orWhere(function($query) {
    $query->where('gender', 'Female')
        ->where('age', '>=', 65);
})

laravel tricks and tips
Article::find($article_id)->increment('read_count');
Article::find($article_id)->increment('read_count', 10); // +10
Product::find($produce_id)->decrement('stock'); // -1
//@sujay
laravel tricks and tips
{{ Form::model($order) }}
    <div>
        {{ Form::label('title', 'Title:') }}
        {{ Form::text('title') }}
    </div>
 
    <div>
        {{ Form::label('description', 'Description:') }}
        {{ Form::textarea('description') }}
    </div>
{{ Form::close() }}
//@sujay
laravel tricks and tips
$user = [
    'email' => 'email',
    'password' => 'password'
];
 
if (Auth::attempt($user))
{
    // user is now logged in!
    // Access user object with Auth::user()
}
//@sujay
laravel tricks and tips
//$user = User::find($id);
//if (!$user) { abort (404); }
//=> do this
$user = User::findOrFail($id);
//@sujay




Php

Related
php bubble sort Code Example php bubble sort Code Example
install bcmath php 7.3 ubuntu Code Example install bcmath php 7.3 ubuntu Code Example
echo php in html Code Example echo php in html Code Example
acf create post with fields Code Example acf create post with fields Code Example
set names utf8 Code Example set names utf8 Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8