This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class Product extends Eloquent { | |
| protected $primaryKey = 'product_id'; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class StoreOffer extends Model | |
| { | |
| public function store() | |
| { | |
| return $this->belongsTo('App\Models\Store', 'store_id', 'store_id'); | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Convert an authentication exception into an unauthenticated response. | |
| * | |
| * @param \Illuminate\Http\Request $request | |
| * @param \Illuminate\Auth\AuthenticationException $exception | |
| * @return \Illuminate\Http\Response | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| RewriteEngine On | |
| Options +FollowSymLinks | |
| RewriteCond %{REQUEST_FILENAME} !-d | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteRule ^ index.php [L] | |
| RewriteRule ^(.*)$ public/$1 [L] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {{ $model->created_at->setTimezone('Asia/Dhaka') }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public function foo() | |
| { | |
| // Container Access | |
| $checker = app()->make('email.checker'); | |
| $checker->isValid('address@domain.com'); | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public function foo() | |
| { | |
| // Facade Access | |
| EmailChecker::isValid('address@domain.com'); | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $args = array( 'category' => 1, 'post_type' => 'post' ); | |
| $postslist = get_posts( $args ); | |
| foreach ($postslist as $post) : setup_postdata($post); | |
| ?> | |
| <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> | |
| <?php the_excerpt(); ?> | |
| <?php endforeach; ?> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| Post::selectRaw('title, categoryid, count(*) total') | |
| ->orderBy('total', 'desc') | |
| ->groupBy('categoryid') | |
| ->get(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App\Http\Controllers; | |
| use App\Http\Controllers\Controller; | |
| use Illuminate\Http\Request; | |
| use Illuminate\Http\Response; | |
| class TestController extends Controller |