renamed 'search' to 'app_search' in router
This commit is contained in:
		
							parent
							
								
									b68d533bac
								
							
						
					
					
						commit
						c838a3d2ed
					
				| @ -11,7 +11,8 @@ use GuzzleHttp\Client; | |||||||
| class SearchController extends AbstractController | class SearchController extends AbstractController | ||||||
| { | { | ||||||
| 
 | 
 | ||||||
|     private static function makeRequest(string $method,string $endpoint, array $querryParams){ |     private static function makeRequest(string $method, string $endpoint, array $querryParams) | ||||||
|  |     { | ||||||
| 
 | 
 | ||||||
|         // Create a new Guzzle HTTP client
 |         // Create a new Guzzle HTTP client
 | ||||||
|         $baseUri = 'https://api.discogs.com/'; |         $baseUri = 'https://api.discogs.com/'; | ||||||
| @ -43,7 +44,7 @@ class SearchController extends AbstractController | |||||||
|         return json_decode($body, true); |         return json_decode($body, true); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     #[Route('/search', name: 'search')]
 |     #[Route('/search', name: 'app_search')]
 | ||||||
|     public function index(Request $request): Response |     public function index(Request $request): Response | ||||||
|     { |     { | ||||||
|         $page = $request->query->get('page'); |         $page = $request->query->get('page'); | ||||||
|  | |||||||
| @ -1,37 +1,34 @@ | |||||||
| <!DOCTYPE html> | <!doctype html> | ||||||
| <html> | <html> | ||||||
|     <head> |     <head> | ||||||
|     <meta charset="UTF-8"> |         <meta charset="UTF-8" /> | ||||||
|         <title>{% block title %}{{app.title}}{% endblock %}</title> |         <title>{% block title %}{{app.title}}{% endblock %}</title> | ||||||
|     <link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text><text y=%221.3em%22 x=%220.2em%22 font-size=%2276%22 fill=%22%23fff%22>sf</text></svg>"> |         <link | ||||||
|  |             rel="icon" | ||||||
|  |             href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text><text y=%221.3em%22 x=%220.2em%22 font-size=%2276%22 fill=%22%23fff%22>sf</text></svg>" | ||||||
|  |         /> | ||||||
|         {% block stylesheets %} |         {% block stylesheets %} | ||||||
|         <link rel="stylesheet" href="{{ asset('styles/app.css') }}" /> |         <link rel="stylesheet" href="{{ asset('styles/app.css') }}" /> | ||||||
|         <link rel="stylesheet" href="{{ asset('styles/fonts.css') }}" /> |         <link rel="stylesheet" href="{{ asset('styles/fonts.css') }}" /> | ||||||
|     {% endblock %} |         {% endblock %} {% block javascripts %} {% block importmap %}{{ | ||||||
|      |         importmap('app') }}{% endblock %} {% endblock %} | ||||||
|     {% block javascripts %} |  | ||||||
|     {% block importmap %}{{ importmap('app') }}{% endblock %} |  | ||||||
|     {% endblock %} |  | ||||||
|     </head> |     </head> | ||||||
|     <body> |     <body> | ||||||
|         {% block header %} |         {% block header %} | ||||||
|         <header> |         <header> | ||||||
|             <a href="{{url('index')}}">Frutti</a> |             <a href="{{url('index')}}">Frutti</a> | ||||||
|         <form action="{{url('search')}}" method="get"> |             <form action="{{url('app_search')}}" method="get"> | ||||||
|             <input type="text" name="q" id="q" placeholder="Search"> |                 <input type="text" name="q" id="q" placeholder="Search" /> | ||||||
|                 <label> |                 <label> | ||||||
|                 <input type="submit" value="search"> |                     <input type="submit" value="search" /> | ||||||
|                 <img src="{{ asset('/styles/search.svg') }}" alt="Search"> |                     <img src="{{ asset('/styles/search.svg') }}" alt="Search" /> | ||||||
|                 </label> |                 </label> | ||||||
|             </form> |             </form> | ||||||
|             <a href="{{url('app_login')}}" class="button-link">Connect</a> |             <a href="{{url('app_login')}}" class="button-link">Connect</a> | ||||||
|         </header> |         </header> | ||||||
|         {% endblock %} |         {% endblock %} | ||||||
| 
 | 
 | ||||||
|     <main> |         <main>{% block body %}{% endblock %}</main> | ||||||
|     {% block body %}{% endblock %} |  | ||||||
|     </main> |  | ||||||
|      |  | ||||||
| 
 | 
 | ||||||
|         {% block footer %} |         {% block footer %} | ||||||
|         <footer> |         <footer> | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user