Support the ongoing development of Laravel.io →
posted 10 years ago
Requests

Hi, in ProductsController i have method

public function getIndex()
{	
	$products = Product::orderBy('created_at', 'DESC')
		->paginate();

	//		
	return view('admin.products.edit', compact('products'));
}

apache trow me error " mod_rewrite.c(1788): [client x.x.x.x] mod_rewrite's internal redirect status: 0/10" but this

public function getIndex()
{	
	$products = Product::orderBy('created_at', 'DESC')
		->paginate();

        print_r($products);
        exit();

	//		
	return view('admin.products.index', compact('products'));
}

works, and prints items in $product variable, this works too (view name)

public function getIndex()
{	
	$products = Product::orderBy('created_at', 'DESC')
		->paginate();

	//		
	return view('admin.products.otherview', compact('products'));
}

when i remove contents of admin.products.index (blank view file) it doesn't work. All other methods in that controller works (other controllers too).

Any idea? something with apache ?

Last updated 3 years ago.
0

Wow, now the seme error with "getEdit" method, 5 minutes ago it works....

0

Sign in to participate in this thread!

Eventy

Your banner here too?

mejlo mejlo Joined 27 May 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.