{"action":"created","issue":{"url":"https://api.github.com/repos/the-control-group/voyager/issues/2970","repository_url":"https://api.github.com/repos/the-control-group/voyager","labels_url":"https://api.github.com/repos/the-control-group/voyager/issues/2970/labels{/name}","comments_url":"https://api.github.com/repos/the-control-group/voyager/issues/2970/comments","events_url":"https://api.github.com/repos/the-control-group/voyager/issues/2970/events","html_url":"https://github.com/the-control-group/voyager/issues/2970","id":314289691,"number":2970,"title":"Undefined variable: dataType in View","user":{"login":"vasildervenski","id":6210624,"avatar_url":"https://avatars3.githubusercontent.com/u/6210624?v=4","gravatar_id":"","url":"https://api.github.com/users/vasildervenski","html_url":"https://github.com/vasildervenski","followers_url":"https://api.github.com/users/vasildervenski/followers","following_url":"https://api.github.com/users/vasildervenski/following{/other_user}","gists_url":"https://api.github.com/users/vasildervenski/gists{/gist_id}","starred_url":"https://api.github.com/users/vasildervenski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vasildervenski/subscriptions","organizations_url":"https://api.github.com/users/vasildervenski/orgs","repos_url":"https://api.github.com/users/vasildervenski/repos","events_url":"https://api.github.com/users/vasildervenski/events{/privacy}","received_events_url":"https://api.github.com/users/vasildervenski/received_events","type":"User","site_admin":false},"labels":[{"id":469741889,"url":"https://api.github.com/repos/the-control-group/voyager/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-04-14T01:44:44Z","updated_at":"2018-04-14T15:38:45Z","closed_at":null,"author_association":"NONE","body":"- Laravel Version: 5.4.3\r\n- Voyager Version: 1.0.17\r\n- PHP Version: 7.1\r\n- Database Driver & Version: 5.6\r\n\r\nHi, first want to thank you for the amazing product and your commitment.\r\n### Description:\r\nSo I'm trying to direct visitors to different (from dashboard)  view when they log into admin. \r\n\r\n```php\r\n// Main Admin  Route\r\nRoute::get('/', ['uses' => 'Voyager\\DelegationsController@index',   'as' => 'dashboard']);\r\n```\r\nCreated a custom controller that extends VoyagerController, made the index method to show the browse.blade.php view which is in /resources/views/vendor/voyager/delegation.\r\n\r\n``` php\r\n<?php\r\n\r\nnamespace App\\Http\\Controllers\\Voyager;\r\n\r\nuse Illuminate\\Http\\Request;\r\nuse Illuminate\\Support\\Facades\\Auth;\r\nuse Illuminate\\Support\\Facades\\Storage;\r\nuse Intervention\\Image\\Constraint;\r\nuse Intervention\\Image\\Facades\\Image;\r\nuse TCG\\Voyager\\Facades\\Voyager;\r\nuse TCG\\Voyager\\Http\\Controllers\\VoyagerController;\r\n\r\nclass DelegationsController extends VoyagerController\r\n{\r\n    public function index()\r\n    {\r\n        return Voyager::view('voyager::delegation.browse');\r\n    }\r\n\r\n   \r\n}\r\n```\r\nIn the database settings I pointed to the customized controller.\r\n![Image of database settings](http://res.cloudinary.com/vasild/image/upload/v1523669792/delegations_sgf9bw.jpg) \r\n\r\nI get the following error:\r\n```\r\nUndefined variable: dataType (View: /home/onedesi/brgfapp/resources/views/vendor/voyager/delegation/browse.blade.php)\r\n--\r\nin 74494d40969d547e469a13af27f6c7dad7b3debc.php (line 1)\r\nat CompilerEngine->handleViewException(object(ErrorException), 0)in PhpEngine.php (line 44)\r\nat PhpEngine->evaluatePath('/home/onedesi/brgfapp/storage/framework/views/74494d40969d547e469a13af27f6c7dad7b3debc.php', array('__env' =>object(Factory), 'app' => object(Application), 'errors' => object(ViewErrorBag), 'alerts' => array()))in CompilerEngine.php (line 59)\r\nat CompilerEngine->get('/home/onedesi/brgfapp/resources/views/vendor/voyager/delegation/browse.blade.php', array('__env' => object(Factory), 'app' =>object(Application), 'errors' => object(ViewErrorBag), 'alerts' => array()))in View.php (line 137)\r\n```\r\nFirst line in  74494d40969d547e469a13af27f6c7dad7b3debc.php is\r\n```php\r\n<?php $__env->startSection('page_title', __('voyager.generic.viewing').' '.$dataType->display_name_plural); ?>\r\n```\r\n### Steps To Reproduce:\r\n"},"comment":{"url":"https://api.github.com/repos/the-control-group/voyager/issues/comments/381337739","html_url":"https://github.com/the-control-group/voyager/issues/2970#issuecomment-381337739","issue_url":"https://api.github.com/repos/the-control-group/voyager/issues/2970","id":381337739,"user":{"login":"vasildervenski","id":6210624,"avatar_url":"https://avatars3.githubusercontent.com/u/6210624?v=4","gravatar_id":"","url":"https://api.github.com/users/vasildervenski","html_url":"https://github.com/vasildervenski","followers_url":"https://api.github.com/users/vasildervenski/followers","following_url":"https://api.github.com/users/vasildervenski/following{/other_user}","gists_url":"https://api.github.com/users/vasildervenski/gists{/gist_id}","starred_url":"https://api.github.com/users/vasildervenski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vasildervenski/subscriptions","organizations_url":"https://api.github.com/users/vasildervenski/orgs","repos_url":"https://api.github.com/users/vasildervenski/repos","events_url":"https://api.github.com/users/vasildervenski/events{/privacy}","received_events_url":"https://api.github.com/users/vasildervenski/received_events","type":"User","site_admin":false},"created_at":"2018-04-14T15:38:44Z","updated_at":"2018-04-14T15:38:44Z","author_association":"NONE","body":"Sorry, maybe I'm not very clear. Following is a view of my admin. I just want to show the content of the first menu item, when users log in. It's not that I want different dashboards but more as hiding the dashboard and showing different content.\r\n\r\n@amrnn, yes I'm using the original `browse.blade.php`, but I'm overriding different controller method, which is `VouagerController`. And those variables are from `VoyagerBreadController`\r\n\r\n![](https://res.cloudinary.com/vasild/image/upload/c_scale,w_766/v1523719217/adminJPG_gfgy2v.jpg)"}}
{"actor":{"display_login":"vasildervenski"}}