waitlist functionality when the feature flag is active
This commit is contained in:
@@ -9,6 +9,7 @@ use Illuminate\Http\Request;
|
|||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use Illuminate\Support\Facades\Gate;
|
use Illuminate\Support\Facades\Gate;
|
||||||
use Illuminate\Support\Facades\Storage;
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
use Laravel\Pennant\Feature;
|
||||||
|
|
||||||
class ProductController extends Controller
|
class ProductController extends Controller
|
||||||
{
|
{
|
||||||
@@ -17,6 +18,11 @@ class ProductController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function homepage()
|
public function homepage()
|
||||||
{
|
{
|
||||||
|
// Check if waitlist feature is active
|
||||||
|
if (Feature::for(null)->active('WaitlistPage')) {
|
||||||
|
return view('waitlist.index');
|
||||||
|
}
|
||||||
|
|
||||||
// Get trending products (most upvoted in the last 7 days)
|
// Get trending products (most upvoted in the last 7 days)
|
||||||
$trendingProducts = Product::query()
|
$trendingProducts = Product::query()
|
||||||
->with(['user', 'category'])
|
->with(['user', 'category'])
|
||||||
|
|||||||
Reference in New Issue
Block a user