Skip to content

Instantly share code, notes, and snippets.

@stillfinder
Created November 29, 2018 23:40
Show Gist options
  • Save stillfinder/2fecc737fde24fb7e29fab9a2ecd831a to your computer and use it in GitHub Desktop.
Save stillfinder/2fecc737fde24fb7e29fab9a2ecd831a to your computer and use it in GitHub Desktop.
SearchController.php
<?php
namespace Drupal\custom_api\Controller;
use Drupal\Core\Controller\ControllerBase;
/**
* Class SearchController.
*/
class SearchController extends ControllerBase {
/**
* Search.
*
* @return string
* Return Hello string.
*/
public function search($search) {
return [
'#type' => 'markup',
'#markup' => $this->t('Implement method: search with parameter(s): $search'),
];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment