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
| <div class="table-responsive"> | |
| <table class="table table-sm table-transparent table-hover" | |
| id="{{ $table_id or 'table-id' }}"> | |
| <thead> | |
| {{ $thead ?? '' }} | |
| </thead> | |
| <tbody> | |
| {{ $tbody ?? '' }} | |
| </tbody> | |
| <tfoot> |
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 | |
| // must first define the relationships between your models | |
| // see here: https://laravel.com/docs/5.3/eloquent-relationships#eager-loading | |
| $result = Topic::where( 'slug', $slug )->approved()->with([ | |
| 'comments' => function( $query ) use ( $data ) { | |
| $query->take( $data['limit'] ) | |
| ->skip( $data['limit'] * ( $data['page'] - 1 ) ) | |
| ->with('user.profile') |
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 | |
| /* app/validators.php */ | |
| Validator::extend('alpha_spaces', function($attribute, $value) | |
| { | |
| return preg_match('/^[\pL\s]+$/u', $value); | |
| }); | |
| /* |