Skip to content

Instantly share code, notes, and snippets.

View itsdanielfelix's full-sized avatar

Daniel Felix itsdanielfelix

View GitHub Profile
// get the Content JTable
$content = JTable::getInstance('Content');
// set the id you want to delete
$content->load((int) $contentId);
// call delete method
$content->delete((int) $contentId);
// get the J2Store Products Model
$productModel = F0FModel::getTmpInstance('Products', 'J2StoreModel');
// set the id you want to delete
$productModel->setId($j2StoreProductId);
// call delete method
$productModel->delete();
@itsdanielfelix
itsdanielfelix / git-tag-delete-local-and-remote.sh
Created September 25, 2020 05:14 — forked from mobilemind/git-tag-delete-local-and-remote.sh
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
// Instead of using @if with (!) in the condition itself
@if (!Auth::check())
You are not signed in.
@endif
// You can use the inverse of @if like below
@unless (Auth::check())
You are not signed in.
@endunless