So I have this structure in my app.blade.php
If statement check if user have subscription and if no shows sub page else show dashboard
I send all required variables to dashboard view like this
But when I'm trying to get variable in before-payment view I cant reach it.
I test it without If statement in Dashboard I can use all variables. So how can I use variables in this situation?
I think its better if u passing to global view via AppServiceProvider ( boot function ).
Just add :
$plan = Plan::first();
view()->share('plan', $plan);