Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace App\Http\Controllers;
- use App\Brand;
- use App\Goods;
- use Illuminate\Http\Request;
- class BrandController extends Controller
- {
- public function brandAction($id){
- $brand = Brand::find($id);
- if($brand){
- $goods = Goods::find(['brand_id' => $brand->brand_id]);
- return view('goods', ['goods' => $goods]);
- }
- }
- }
Add Comment
Please, Sign In to add comment