These learning resources primarily focus on programming using Good Design Principles and Design Patterns
- There is an emphasis on learning using PHP, although most patterns are universal to every object orientated language.
{{-- | |
Icon view component for Laravel 7. | |
@disclaimer The icons used in this component are taken from "Refactoring UI Heroicons" (md-outline collection). | |
For more info https://github.com/refactoringui/heroicons by Steve Schoger & Adam Wathan. | |
@copyright MIT | |
@author Maurizio <https://twitter.com/mauriziolepora> |
<script src="{{ asset('js/app.js') }}"></script> | |
<script> | |
let logComponentsData = function () { | |
window.livewire.components.components().forEach(component => { | |
console.log(component.name); | |
console.log(component.data); | |
}); | |
}; | |
document.addEventListener("livewire:load", function(event) { |
<?php | |
// Register these inside a service provider: | |
Blade::directive('route', function ($expression) { | |
return "<?php echo route({$expression}) ?>"; | |
}); | |
Blade::directive('routeIs', function ($expression) { | |
return "<?php if (request()->routeIs({$expression})) : ?>"; |
Mute these words in your settings here: https://twitter.com/settings/muted_keywords | |
ActivityTweet | |
generic_activity_highlights | |
generic_activity_momentsbreaking | |
RankedOrganicTweet | |
suggest_activity | |
suggest_activity_feed | |
suggest_activity_highlights | |
suggest_activity_tweet |
Route::get('/', function (\Illuminate\Http\Request $request) { | |
$initialSearch = $request->query('search', ''); | |
$userQuery = User::query() | |
->when($request->filled('search'),function($query) use ($initialSearch){ | |
$query->where('name','LIKE','%'.$initialSearch.'%') | |
->orWhere('email','LIKE','%'.$initialSearch.'%'); | |
}); |
/* dragging logic for nomadlist.com/dating */ | |
/* by @levelsio */ | |
/* MIT license */ | |
/* <dragging logic> */ | |
$('body').on('mousedown touchstart','.card',function(e) { | |
if(!currentCardUserId) return; | |
if($('card.match_card').is(':visible')) return; | |
if(typeof e.originalEvent.touches !=='undefined') { | |
/* touch device */ |
name: Format PHP | |
on: | |
pull_request: | |
paths: | |
- '*.php' | |
jobs: | |
php-cs-fixer: | |
runs-on: ubuntu-latest |
<?php | |
use UnexpectedValueException; | |
class DirectoryMounter | |
{ | |
/** | |
* The path to mount. | |
* | |
* @var string|null |
If you don't want to pay for the PRO version of this plugin, and you want to use the "Restore from Server" functionally that was present in the version 6.77, open your browser’s dev tools and run the code below in the console:
Last confirmed working: May 2025 on version 7.94
var filename = 'FILENAME.wpress';