Skip to content

Instantly share code, notes, and snippets.

View tarikulwebx's full-sized avatar
🚀
Building the future, one commit at a time 🚀

Md. Tarikul Islam tarikulwebx

🚀
Building the future, one commit at a time 🚀
View GitHub Profile

Solution for TenancyForLaravel Tenancy Asset Not Found Problem

Suppose you uploaded an image in a Tenant workspace say test.localhost and the asset or tenant_asset helper return url like http://test.localhost:8000/tenancy/assets/2/logoipsum-381.png. When you visit the URL, it cannot detect the file and show error Tenant could not be identified on domain test.localhost.

If you facing this issue, then this solution for you.

First, make sure

  • You configured your disk properly in tenancy.filesystem and filesystem config.
  • Set tenancy.filesystem.asset_helper_tenancy false to avoid conflict with central assets.
  • If you are using spatie media library make sure, you are using TenantAwareUrlGenerator by extending DefaultUrlGenerator. Here is the ref -> laravel-medialibrary
@tarikulwebx
tarikulwebx / .md
Created February 28, 2025 13:32
How to update laravel installer?

composer global update laravel/installer is not enough to upgrade the the desired version of laravel/installer, there might be package dependencies that restricts the upgrade to the latest. So try the below steps to upgrade to the latest.

Step 1: Uninstall the Package

composer global remove laravel/installer

Step 2: Reinstall

composer global update
@tarikulwebx
tarikulwebx / script.sh
Last active November 12, 2024 11:18 — forked from lopezjurip/script.sh
Github Full Code Review Process
# Create empty branch.
git checkout --orphan review
git rm -rf .
git commit --allow-empty -m "Create empty branch"
git push --set-upstream origin review
# Create `project` branch from `master` current state.
git checkout -b project
git merge main --allow-unrelated-histories
git push --set-upstream origin project
@tarikulwebx
tarikulwebx / .prettierrc.cjs
Last active July 17, 2024 01:34
Required Prettier Configuration for React App
module.exports = {
printWidth: 120, // max 120 chars in line, code is easy to read
useTabs: false, // use spaces instead of tabs
tabWidth: 4, // "visual width" of of the "tab"
trailingComma: 'es5', // add trailing commas in objects, arrays, etc.
semi: true, // add ; when needed
singleQuote: true, // '' for stings instead of ""
bracketSpacing: true, // import { some } ... instead of import {some} ...
arrowParens: 'always', // braces even for single param in arrow functions (a) => { }
jsxSingleQuote: false, // "" for react props, like in html
@tarikulwebx
tarikulwebx / Larave_github_project_run_on_local_machine.md
Last active January 4, 2023 09:36
Run Laravel project locally from Github

Setup XAMPP/WAPM:

Follow the next processes: