You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							17 lines
						
					
					
						
							335 B
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							17 lines
						
					
					
						
							335 B
						
					
					
				
								<?php
							 | 
						|
								
							 | 
						|
								namespace App\Http\Controllers\Api;
							 | 
						|
								use App\Http\Controllers\Controller;
							 | 
						|
								use App\Models\Category;
							 | 
						|
								
							 | 
						|
								class CategoryController extends Controller
							 | 
						|
								{
							 | 
						|
								    public function index()
							 | 
						|
									{
							 | 
						|
										$list = Category::query()
							 | 
						|
											->where('agent_id', $this->agent_id)
							 | 
						|
											->orderBy('sort')
							 | 
						|
											->get(['id', 'name']);
							 | 
						|
										return $this->success($list);
							 | 
						|
									}
							 | 
						|
								}
							 |