Settings, Commands etc....
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\Nova; | |
| use Illuminate\Database\Eloquent\Builder; | |
| use Laravel\Nova\Http\Requests\NovaRequest; | |
| use Laravel\Nova\Resource as NovaResource; | |
| use Laravel\Scout\Builder as ScoutBuilder; | |
| abstract class Resource extends NovaResource |
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\Support\Spatie; | |
| use Illuminate\Support\Str; | |
| use Spatie\MediaLibrary\MediaCollections\Models\Media; | |
| use Spatie\MediaLibrary\Support\PathGenerator\PathGenerator; | |
| class CustomPathGenerator implements PathGenerator | |
| { |
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
| $font-awesome: 'Font Awesome 5 Pro'; | |
| $color-alert: #e74b4b; | |
| a { | |
| color: $color-alert !important; | |
| padding-left: 1.65rem; | |
| &:before { | |
| position: absolute; | |
| width: 0.9rem; |
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
| // `nano ~/.composer/auth.json` | |
| // | |
| // Basic- and OAuth: | |
| { | |
| "http-basic": { | |
| "github.com": { | |
| "username": "[GITHUB-USERNAME]", | |
| "password": "ghp_[PERSONAL-TOKEN]" | |
| }, | |
| "nova.laravel.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 | |
| namespace App\Console\Commands; | |
| use Illuminate\Foundation\Console\DownCommand as Command; | |
| use Illuminate\Foundation\Exceptions\RegisterErrorViewPaths; | |
| class DownCommand extends Command | |
| { | |
| /** |
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 | |
| add_filter('language_attributes', function () { | |
| return 'lang="'.explode('-', get_bloginfo('language'))[0].'"'; | |
| }, 10, 2); |
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
| #Allow w3c validator | |
| Allow from 128.30.52.73 | |
| Allow from 128.30.52.96 | |
| Allow from .w3.org | |
| #Allow PayPal | |
| Allow from 151.101.129.21 | |
| Allow from .paypal.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 | |
| add_action('admin_footer-post-new.php', 'wp_admin_default_media_attachment_filter'); | |
| add_action('admin_footer-post.php', 'wp_admin_default_media_attachment_filter'); | |
| function wp_admin_default_media_attachment_filter() | |
| { | |
| ?> | |
| <script type="text/javascript"> | |
| jQuery(document).on("DOMNodeInserted", function () { | |
| jQuery('select.attachment-filters [value="uploaded"]').attr('selected', true).parent().trigger('change'); |
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 | |
| add_filter( 'woocommerce_register_post_type_product', 'wc_add_revision_support' ); | |
| function wc_add_revision_support( $args ) { | |
| $args['supports'][] = 'revisions'; | |
| return $args; | |
| } |