{"id":3023,"date":"2014-03-13T12:12:13","date_gmt":"2014-03-13T12:12:13","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/13\/problem-about-laravel-routing-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:45:33","modified_gmt":"2022-08-30T15:45:33","slug":"problem-about-laravel-routing-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/13\/problem-about-laravel-routing-collection-of-common-programming-errors\/","title":{"rendered":"problem about laravel-routing-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/lRkrq.jpg?s=32&amp;g=1\" \/><br \/>\ncore_m<br \/>\nmodel controller laravel laravel-4 laravel-routing<br \/>\nI can&#8217;t get rid of the errors. I&#8217;ve created an model, and have functions in controllers and a route, but I get errors.my model(newsticker.php):&lt;?phpclass Newsticker extends Eloquent {protected $table = &#8216;aac_newsticker&#8217;;protected $fillable = array(&#8216;label&#8217;, &#8216;content&#8217;);public $timestamps = true; }my controller (also used for other functions, but used also for newstickers):&lt;?phpclass NewsController extends BaseController {\/*** News Repository** @var News*\/protected $news;public function __cons<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/40de750233b3ce8268f235ba0b6a489b?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nteresko<br \/>\nphp laravel laravel-routing<br \/>\nI&#8217;m trying to access the name of the current controller and the current method to pass it to my view as a variable. I&#8217;ve tried several ways from pointers I found online but they don&#8217;t work so I assume they were for Laravel 3.Here is what I&#8217;ve triedRequest::$route-&gt;controllergivesAccess to undeclared static property: Illuminate\\Support\\Facades\\Request::$routeandRequest::route()-&gt;controllergivesCall to undefined method Illuminate\\Http\\Request::route()<\/li>\n<\/ul>\n<p>Web site is in building<\/p>\n","protected":false},"excerpt":{"rendered":"<p>core_m model controller laravel laravel-4 laravel-routing I can&#8217;t get rid of the errors. I&#8217;ve created an model, and have functions in controllers and a route, but I get errors.my model(newsticker.php):&lt;?phpclass Newsticker extends Eloquent {protected $table = &#8216;aac_newsticker&#8217;;protected $fillable = array(&#8216;label&#8217;, &#8216;content&#8217;);public $timestamps = true; }my controller (also used for other functions, but used also for [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,1],"tags":[],"class_list":["post-3023","post","type-post","status-publish","format-standard","hentry","category-laravel","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3023","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=3023"}],"version-history":[{"count":1,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3023\/revisions"}],"predecessor-version":[{"id":8840,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3023\/revisions\/8840"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=3023"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=3023"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=3023"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}