This file contains 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
1. Download the `.AppImage` file and an icon you would like to register it with | |
2. Move the `.AppImage` file to the path `/bin`, e.g. `sudo mv ~/Downloads/Vemto.AppImage /bin/` | |
3. Make it executable with `sudo chmod +x /bin/Vemto.AppImage` | |
4. Save the icon under `/usr/share/icons/custom/vemto.png` e.g. `sudo mkdir --parents /usr/share/icons/custom && sudo mv ~/Downloads/vemto.png /usr/share/icons/custom/` | |
5. Create a `.desktop` file under `~/.local/share/applications/vemto.desktop` | |
6. Paste the following content into it (make sure to remove the comments): | |
``` | |
[Desktop Entry] | |
Name=Vemto |
This file contains 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
/** | |
* Searching Eloquent models with Relations | |
* | |
* Example Post::whereLike(['name', 'text', 'author.name', 'tags.name'], $searchTerm)->get(); | |
*/ | |
Builder::macro('whereLike', function ($attributes, string $searchTerm) { | |
$this->where(function (Builder $query) use ($attributes, $searchTerm) { | |
foreach (\Arr::wrap($attributes) as $attribute) { | |
$query->when( | |
str_contains($attribute, '.'), |