Http/Kernel.php .env .env-local.env .env-staging.env .env-production.env class Kernel extends HttpKernel { public function __construct(Application $app, Router $router) { parent::__construct($app, $router); $environmentPath = __DIR__.'/../../'; $dotenv = Dotenv::createUnsafeImmutable($environmentPath, '.env'); // getenv not thread safe $dotenv->safeLoad(); //this is important $dotenv = Dotenv::createUnsafeImmutable($environmentPath, '.env.'.getenv('APP_ENV').'.env'); // getenv not thread safe $dotenv->safeLoad(); //this is important } .env``` APP_ENV=local LOG_CHANNEL=stack BROADCAST_DRIVER=log CACHE_DRIVER=file QUEUE_CONNECTION=sync SESSION_DRIVER=file SESSION_LIFETIME=120 PUSHER_APP_ID= PUSHER_APP_KEY= PUSHER_APP_SECRET= PUSHER_APP_CLUSTER=mt1 MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" .env.local.env``` APP_NAME=OOXX_Local APP_KEY=base64:NDvP.........g= APP_DEBUG=true APP_URL=http://localhost QUERY_DETECTOR_ENABLED=true DB_CONNECTION=mysql DB_HOST=127.

繼續閱讀

When you use some model ->paginate Get Illuminate\Pagination\LengthAwarePaginator But Value Don’t Back To Variable. $orders->paginate(10) $orders = $orders->paginate(10) So $this->orders->paginate(10) $this->oorders = $this->oorders->paginate(10)

繼續閱讀

Get livewire public variable Front web Try to get public $order``` document.addEventListener(‘livewire:load’, function () { console.log(@this.order); livewire window.livewire.find eloquent collection https://github.com/livewire/livewire/issues/1641?fbclid=IwAR0uHylkj-1vg8p5jUoBgPYfuAYsWnBhgp6EK2bJcBce8ze-tdtAa8ElLNY#issuecomment-736146468 Eloquent Collection data won't be made available to the front end unless you have the collection properties specified in the $rules array as the contents are models, so the same conditions apply to it as apply to just a single model property. This is for security reasons so the whole collection and all properties aren't just sent to the front end.

繼續閱讀

作者的圖片

Sue boy

Sueboy Can support You

CIO

Taiwan