From 49944bab96ef054251f142502d4cec5b4d592039 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 22 May 2012 09:12:21 -0500 Subject: [PATCH 1/8] Increment version. --- artisan | 2 +- laravel/auth/drivers/driver.php | 446 ++++++++++++++++---------------- paths.php | 2 +- public/index.php | 2 +- 4 files changed, 226 insertions(+), 226 deletions(-) diff --git a/artisan b/artisan index 34469c09..2bae56ad 100644 --- a/artisan +++ b/artisan @@ -3,7 +3,7 @@ * Laravel - A PHP Framework For Web Artisans * * @package Laravel - * @version 3.2.0 Beta 1 + * @version 3.2.0 * @author Taylor Otwell * @link http://laravel.com */ diff --git a/laravel/auth/drivers/driver.php b/laravel/auth/drivers/driver.php index d2927cd9..4a272ba4 100644 --- a/laravel/auth/drivers/driver.php +++ b/laravel/auth/drivers/driver.php @@ -1,224 +1,224 @@ -token = Session::get($this->token()); - } - - // If a token did not exist in the session for the user, we will attempt - // to load the value of a "remember me" cookie for the driver, which - // serves as a long-lived client side authenticator for the user. - if (is_null($this->token)) - { - $this->token = $this->recall(); - } - } - - /** - * Determine if the user of the application is not logged in. - * - * This method is the inverse of the "check" method. - * - * @return bool - */ - public function guest() - { - return ! $this->check(); - } - - /** - * Determine if the user is logged in. - * - * @return bool - */ - public function check() - { - return ! is_null($this->user()); - } - - /** - * Get the current user of the application. - * - * If the user is a guest, null should be returned. - * - * @return mixed|null - */ - public function user() - { - if ( ! is_null($this->user)) return $this->user; - - return $this->user = $this->retrieve($this->token); - } - - /** - * Get the a given application user by ID. - * - * @param int $id - * @return mixed - */ - abstract public function retrieve($id); - - /** - * Attempt to log a user into the application. - * - * @param array $arguments - * @return void - */ - abstract public function attempt($arguments = array()); - - /** - * Login the user assigned to the given token. - * - * The token is typically a numeric ID for the user. - * - * @param string $token - * @param bool $remember - * @return bool - */ - public function login($token, $remember = false) - { - $this->token = $token; - - $this->store($token); - - if ($remember) $this->remember($token); - - return true; - } - - /** - * Log the user out of the driver's auth context. - * - * @return void - */ - public function logout() - { - $this->user = null; - - $this->cookie($this->recaller(), null, -2000); - - Session::forget($this->token()); - } - - /** - * Store a user's token in the session. - * - * @param string $token - * @return void - */ - protected function store($token) - { - Session::put($this->token(), $token); - } - - /** - * Store a user's token in a long-lived cookie. - * - * @param string $token - * @return void - */ - protected function remember($token) - { - $token = Crypter::encrypt($token.'|'.Str::random(40)); - - $this->cookie($this->recaller(), $token, Cookie::forever); - } - - /** - * Attempt to find a "remember me" cookie for the user. - * - * @return string|null - */ - protected function recall() - { - $cookie = Cookie::get($this->recaller()); - - // By default, "remember me" cookies are encrypted and contain the user - // token as well as a random string. If it exists, we'll decrypt it - // and return the first segment, which is the user's ID token. - if ( ! is_null($cookie)) - { - return head(explode('|', Crypter::decrypt($cookie))); - } - } - - /** - * Store an authentication cookie. - * - * @param string $name - * @param string $value - * @param int $minutes - * @return void - */ - protected function cookie($name, $value, $minutes) - { - // When setting the default implementation of an authentication - // cookie we'll use the same settings as the session cookie. - // This typically makes sense as they both are sensitive. - $config = Config::get('session'); - - extract($config); - - Cookie::put($name, $value, $minutes, $path, $domain, $secure); - } - - /** - * Get session key name used to store the token. - * - * @return string - */ - protected function token() - { - return $this->name().'_login'; - } - - /** - * Get the name used for the "remember me" cookie. - * - * @return string - */ - protected function recaller() - { - return $this->name().'_remember'; - } - - /** - * Get the name of the driver in a storage friendly format. - * - * @return string - */ - protected function name() - { - return strtolower(str_replace('\\', '_', get_class($this))); - } - +token = Session::get($this->token()); + } + + // If a token did not exist in the session for the user, we will attempt + // to load the value of a "remember me" cookie for the driver, which + // serves as a long-lived client side authenticator for the user. + if (is_null($this->token)) + { + $this->token = $this->recall(); + } + } + + /** + * Determine if the user of the application is not logged in. + * + * This method is the inverse of the "check" method. + * + * @return bool + */ + public function guest() + { + return ! $this->check(); + } + + /** + * Determine if the user is logged in. + * + * @return bool + */ + public function check() + { + return ! is_null($this->user()); + } + + /** + * Get the current user of the application. + * + * If the user is a guest, null should be returned. + * + * @return mixed|null + */ + public function user() + { + if ( ! is_null($this->user)) return $this->user; + + return $this->user = $this->retrieve($this->token); + } + + /** + * Get the a given application user by ID. + * + * @param int $id + * @return mixed + */ + abstract public function retrieve($id); + + /** + * Attempt to log a user into the application. + * + * @param array $arguments + * @return void + */ + abstract public function attempt($arguments = array()); + + /** + * Login the user assigned to the given token. + * + * The token is typically a numeric ID for the user. + * + * @param string $token + * @param bool $remember + * @return bool + */ + public function login($token, $remember = false) + { + $this->token = $token; + + $this->store($token); + + if ($remember) $this->remember($token); + + return true; + } + + /** + * Log the user out of the driver's auth context. + * + * @return void + */ + public function logout() + { + $this->user = null; + + $this->cookie($this->recaller(), null, -2000); + + Session::forget($this->token()); + } + + /** + * Store a user's token in the session. + * + * @param string $token + * @return void + */ + protected function store($token) + { + Session::put($this->token(), $token); + } + + /** + * Store a user's token in a long-lived cookie. + * + * @param string $token + * @return void + */ + protected function remember($token) + { + $token = Crypter::encrypt($token.'|'.Str::random(40)); + + $this->cookie($this->recaller(), $token, Cookie::forever); + } + + /** + * Attempt to find a "remember me" cookie for the user. + * + * @return string|null + */ + protected function recall() + { + $cookie = Cookie::get($this->recaller()); + + // By default, "remember me" cookies are encrypted and contain the user + // token as well as a random string. If it exists, we'll decrypt it + // and return the first segment, which is the user's ID token. + if ( ! is_null($cookie)) + { + return head(explode('|', Crypter::decrypt($cookie))); + } + } + + /** + * Store an authentication cookie. + * + * @param string $name + * @param string $value + * @param int $minutes + * @return void + */ + protected function cookie($name, $value, $minutes) + { + // When setting the default implementation of an authentication + // cookie we'll use the same settings as the session cookie. + // This typically makes sense as they both are sensitive. + $config = Config::get('session'); + + extract($config); + + Cookie::put($name, $value, $minutes, $path, $domain, $secure); + } + + /** + * Get session key name used to store the token. + * + * @return string + */ + protected function token() + { + return $this->name().'_login'; + } + + /** + * Get the name used for the "remember me" cookie. + * + * @return string + */ + protected function recaller() + { + return $this->name().'_remember'; + } + + /** + * Get the name of the driver in a storage friendly format. + * + * @return string + */ + protected function name() + { + return strtolower(str_replace('\\', '_', get_class($this))); + } + } \ No newline at end of file diff --git a/paths.php b/paths.php index e3fb0b66..909d3b43 100644 --- a/paths.php +++ b/paths.php @@ -3,7 +3,7 @@ * Laravel - A PHP Framework For Web Artisans * * @package Laravel - * @version 3.2.0 Beta 1 + * @version 3.2.0 * @author Taylor Otwell * @link http://laravel.com */ diff --git a/public/index.php b/public/index.php index cbdf8065..463d227b 100644 --- a/public/index.php +++ b/public/index.php @@ -3,7 +3,7 @@ * Laravel - A PHP Framework For Web Artisans * * @package Laravel - * @version 3.2.0 Beta 1 + * @version 3.2.0 * @author Taylor Otwell * @link http://laravel.com */ From cdcca78548e4f07bf583ca22879ea30be4c838f1 Mon Sep 17 00:00:00 2001 From: Dayle Rees Date: Tue, 22 May 2012 17:03:26 +0100 Subject: [PATCH 2/8] profiler upgrade additions Signed-off-by: Dayle Rees --- laravel/documentation/changes.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/laravel/documentation/changes.md b/laravel/documentation/changes.md index 167bf4f9..1486e249 100644 --- a/laravel/documentation/changes.md +++ b/laravel/documentation/changes.md @@ -82,6 +82,18 @@ ## Upgrading From 3.1 - Add new `asset_url` and `profiler` options to application configuration. - Replace **auth** configuration file. + +Add the following entry to the `aliases` array in `config/application.php`.. + + 'Profiler' => 'Laravel\\Profiling\\Profiler', + +Add the following code above `Blade::sharpen()` in `application/start.php`.. + + if (Config::get('application.profiler')) + { + Profiler::attach(); + } + - Upgrade the **paths.php** file. - Replace the **laravel** folder. From 7cc4df852be5354b9ce6b0b4db805499fa084b1e Mon Sep 17 00:00:00 2001 From: Guillaume Lambert Date: Tue, 22 May 2012 23:03:29 -0400 Subject: [PATCH 3/8] added prevent default to anbu events and linted/formatted profiler.js code Signed-off-by: Guillaume Lambert --- application/config/application.php | 2 +- laravel/profiling/profiler.css | 8 +- laravel/profiling/profiler.js | 161 ++++++++++++++++------------- 3 files changed, 100 insertions(+), 71 deletions(-) diff --git a/application/config/application.php b/application/config/application.php index 57b08295..6057ce1a 100755 --- a/application/config/application.php +++ b/application/config/application.php @@ -67,7 +67,7 @@ | */ - 'profiler' => false, + 'profiler' => true, /* |-------------------------------------------------------------------------- diff --git a/laravel/profiling/profiler.css b/laravel/profiling/profiler.css index dc4cb27c..a17c559d 100755 --- a/laravel/profiling/profiler.css +++ b/laravel/profiling/profiler.css @@ -2,7 +2,7 @@ .anbu { font-family:Helvetica, "Helvetica Neue", Arial, sans-serif !important; font-size:14px !important; - background-color:#222 !important; + background-color:#222 !important; position:fixed !important; bottom:0 !important; right:0 !important; @@ -214,3 +214,9 @@ .anbu pre white-space: -o-pre-wrap; word-wrap: break-word; } + +/* hide panel-open elements, will become visible through anbu.start() */ + +#anbu-close, #anbu-zoom, .anbu-tab-pane { + visibility: hidden; +} diff --git a/laravel/profiling/profiler.js b/laravel/profiling/profiler.js index 81795e04..3fbaa478 100755 --- a/laravel/profiling/profiler.js +++ b/laravel/profiling/profiler.js @@ -6,77 +6,103 @@ var anbu = { // the DOM every time they are used. el : { - main : $('.anbu'), - close : $('#anbu-close'), - zoom : $('#anbu-zoom'), - hide : $('#anbu-hide'), - show : $('#anbu-show'), - tab_pane : $('.anbu-tab-pane'), - hidden_tab_pane : $('.anbu-tab-pane:visible'), - tab : $('.anbu-tab'), - tabs : $('.anbu-tabs'), - tab_links : $('.anbu-tabs a'), - window : $('.anbu-window'), - closed_tabs : $('#anbu-closed-tabs'), - open_tabs : $('#anbu-open-tabs'), - content_area : $('.anbu-content-area') + main: $('.anbu'), + close: $('#anbu-close'), + zoom: $('#anbu-zoom'), + hide: $('#anbu-hide'), + show: $('#anbu-show'), + tab_pane: $('.anbu-tab-pane'), + hidden_tab_pane: $('.anbu-tab-pane:visible'), + tab: $('.anbu-tab'), + tabs: $('.anbu-tabs'), + tab_links: $('.anbu-tabs a'), + window: $('.anbu-window'), + closed_tabs: $('#anbu-closed-tabs'), + open_tabs: $('#anbu-open-tabs'), + content_area: $('.anbu-content-area') }, // CLASS ATTRIBUTES // ------------------------------------------------------------- // Useful variable for Anbu. - isZoomed : false, // is anbu in full screen mode - small_height : $('.anbu-content-area').height(), // initial height of content area - active_tab : 'anbu-active-tab', // the name of the active tab css - tab_data : 'data-anbu-tab', // the data attribute of the tab link - mini_button_width : '2.6em', // size of anbu when compact - window_open : false, // is the top window open? - active_pane : '', // current active pane + // is anbu in full screen mode + is_zoomed: false, + + // initial height of content area + small_height: $('.anbu-content-area').height(), + + // the name of the active tab css + active_tab: 'anbu-active-tab', + + // the data attribute of the tab link + tab_data: 'data-anbu-tab', + + // size of anbu when compact + mini_button_width: '2.6em', + + // is the top window open? + window_open: false, + + // current active pane + active_pane: '', // START() // ------------------------------------------------------------- // Sets up all the binds for Anbu! - start : function () - { - // hide initial elements + start: function() { - anbu.el.close.hide(); - anbu.el.zoom.hide(); - anbu.el.tab_pane.hide(); + // hide initial elements + anbu.el.close.css('visibility', 'visible').hide(); + anbu.el.zoom.css('visibility', 'visible').hide(); + anbu.el.tab_pane.css('visibility', 'visible').hide(); // bind all click events - anbu.el.close.click( function () { anbu.close_window(); }); - anbu.el.hide.click( function () { anbu.hide(); }); - anbu.el.show.click( function () { anbu.show(); }); - anbu.el.zoom.click( function () { anbu.zoom(); }); - anbu.el.tab.click( function () { anbu.clicked_tab($(this)); }); + anbu.el.close.click(function(event) { + anbu.close_window(); + event.preventDefault(); + }); + anbu.el.hide.click(function(event) { + anbu.hide(); + event.preventDefault(); + }); + anbu.el.show.click(function(event) { + anbu.show(); + event.preventDefault(); + }); + anbu.el.zoom.click(function(event) { + anbu.zoom(); + event.preventDefault(); + }); + anbu.el.tab.click(function(event) { + anbu.clicked_tab($(this)); + event.preventDefault(); + }); + }, // CLICKED_TAB() // ------------------------------------------------------------- // A tab has been clicked, decide what to do. - clicked_tab : function (tab) - { + clicked_tab: function(tab) { + // if the tab is closed - if(anbu.window_open && anbu.active_pane == tab.attr(anbu.tab_data)) - { + if (anbu.window_open && anbu.active_pane == tab.attr(anbu.tab_data)) { anbu.close_window(); - } - else - { + } else { anbu.open_window(tab); } + }, // OPEN_WINDOW() // ------------------------------------------------------------- // Animate open the top window to the appropriate tab. - open_window : function (tab) - { + open_window: function(tab) { + // can't directly assign this line, but it works $('.anbu-tab-pane:visible').fadeOut(200); $('.' + tab.attr(anbu.tab_data)).delay(220).fadeIn(300); @@ -87,15 +113,15 @@ var anbu = { anbu.el.zoom.fadeIn(300); anbu.active_pane = tab.attr(anbu.tab_data); anbu.window_open = true; - }, + }, // CLOSE_WINDOW() // ------------------------------------------------------------- // Animate closed the top window hiding all tabs. - close_window : function() - { + close_window: function() { + anbu.el.tab_pane.fadeOut(100); anbu.el.window.slideUp(300); anbu.el.close.fadeOut(300); @@ -103,36 +129,36 @@ var anbu = { anbu.el.tab_links.removeClass(anbu.active_tab); anbu.active_pane = ''; anbu.window_open = false; - }, + }, // SHOW() // ------------------------------------------------------------- // Show the Anbu toolbar when it has been compacted. - show : function () - { - anbu.el.closed_tabs.fadeOut(600, function () { - anbu.el.open_tabs.fadeIn(200); - }) - anbu.el.main.animate({width: '100%'}, 700); - anbu.el.main.removeClass('hidden'); + show: function() { + + anbu.el.closed_tabs.fadeOut(600, function () { + anbu.el.open_tabs.fadeIn(200); + }); + anbu.el.main.animate({width: '100%'}, 700); + anbu.el.main.removeClass('hidden'); + }, // HIDE() // ------------------------------------------------------------- // Hide the anbu toolbar, show a tiny re-open button. - hide : function () - { - + hide: function() { + anbu.close_window(); anbu.el.window.slideUp(400, function () { anbu.close_window(); anbu.el.main.addClass('hidden'); anbu.el.open_tabs.fadeOut(200, function () { anbu.el.closed_tabs.fadeIn(200); - }) + }); anbu.el.main.animate({width: anbu.mini_button_width}, 700); }); @@ -142,27 +168,24 @@ var anbu = { // ------------------------------------------------------------- // Toggle the zoomed mode of the top window. - zoom : function () - { - if(anbu.isZoomed) - { + zoom: function() { + + if (anbu.is_zoomed) { height = anbu.small_height; - anbu.isZoomed = false; - } - else - { + anbu.is_zoomed = false; + } else { // the 6px is padding on the top of the window height = ($(window).height() - anbu.el.tabs.height() - 6) + 'px'; - anbu.isZoomed = true; + anbu.is_zoomed = true; } anbu.el.content_area.animate({height: height}, 700); + } -} +}; - -jQuery(document).ready(function () { - // launch anbu +// launch anbu on jquery dom ready +jQuery(document).ready(function() { anbu.start(); }); \ No newline at end of file From fa6d0e92a9db43d96c062aba2746dbc339d4c32b Mon Sep 17 00:00:00 2001 From: Guillaume Lambert Date: Tue, 22 May 2012 23:09:56 -0400 Subject: [PATCH 4/8] added prevent default to anbu events and linted/formatted profiler.js code, profiler config in application back to false Signed-off-by: Guillaume Lambert --- application/config/application.php | 2 +- laravel/profiling/profiler.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/application/config/application.php b/application/config/application.php index 6057ce1a..57b08295 100755 --- a/application/config/application.php +++ b/application/config/application.php @@ -67,7 +67,7 @@ | */ - 'profiler' => true, + 'profiler' => false, /* |-------------------------------------------------------------------------- diff --git a/laravel/profiling/profiler.js b/laravel/profiling/profiler.js index 3fbaa478..25099843 100755 --- a/laravel/profiling/profiler.js +++ b/laravel/profiling/profiler.js @@ -5,7 +5,7 @@ var anbu = { // Binding these elements early, stops jQuery from "querying" // the DOM every time they are used. - el : { + el: { main: $('.anbu'), close: $('#anbu-close'), zoom: $('#anbu-zoom'), From 5f0e70a2ef63113d423b5857aaa73bc24e4a241f Mon Sep 17 00:00:00 2001 From: Guillaume Lambert Date: Tue, 22 May 2012 23:33:02 -0400 Subject: [PATCH 5/8] fixed a conflict with .hidden class when using twitter bootstrap and made animation smoother Signed-off-by: Guillaume Lambert --- laravel/profiling/profiler.css | 2 +- laravel/profiling/profiler.js | 19 +++++++++++-------- public/laravel/css/style.css | 2 +- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/laravel/profiling/profiler.css b/laravel/profiling/profiler.css index a17c559d..f5cafa60 100755 --- a/laravel/profiling/profiler.css +++ b/laravel/profiling/profiler.css @@ -21,7 +21,7 @@ .anbu-tabs background-position:5px -8px; } -.anbu.hidden .anbu-tabs +.anbu-hidden .anbu-tabs { background-image:none; } diff --git a/laravel/profiling/profiler.js b/laravel/profiling/profiler.js index 25099843..ab73ad8e 100755 --- a/laravel/profiling/profiler.js +++ b/laravel/profiling/profiler.js @@ -139,10 +139,10 @@ var anbu = { show: function() { anbu.el.closed_tabs.fadeOut(600, function () { + anbu.el.main.removeClass('anbu-hidden'); anbu.el.open_tabs.fadeIn(200); }); anbu.el.main.animate({width: '100%'}, 700); - anbu.el.main.removeClass('hidden'); }, @@ -153,14 +153,17 @@ var anbu = { hide: function() { anbu.close_window(); - anbu.el.window.slideUp(400, function () { - anbu.close_window(); - anbu.el.main.addClass('hidden'); - anbu.el.open_tabs.fadeOut(200, function () { - anbu.el.closed_tabs.fadeIn(200); + + setTimeout(function() { + anbu.el.window.slideUp(400, function () { + anbu.close_window(); + anbu.el.main.addClass('anbu-hidden'); + anbu.el.open_tabs.fadeOut(200, function () { + anbu.el.closed_tabs.fadeIn(200); + }); + anbu.el.main.animate({width: anbu.mini_button_width}, 700); }); - anbu.el.main.animate({width: anbu.mini_button_width}, 700); - }); + }, 100); }, diff --git a/public/laravel/css/style.css b/public/laravel/css/style.css index 5a1108d6..b4cd810e 100755 --- a/public/laravel/css/style.css +++ b/public/laravel/css/style.css @@ -166,7 +166,7 @@ .content>h1:not(:first-child) { .content table { border-collapse:collapse - border:1px solid #eee; + border: 1px solid #eee; width:100%; line-height:1.5em; } From 5bd64f4030b8d5f9d803af72a971dac53abf5358 Mon Sep 17 00:00:00 2001 From: Edwin Aw Date: Wed, 23 May 2012 17:44:41 +0800 Subject: [PATCH 6/8] Typo in documentation Fixed typo in controllers documentation --- laravel/documentation/controllers.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/laravel/documentation/controllers.md b/laravel/documentation/controllers.md index 5468653b..220c10af 100644 --- a/laravel/documentation/controllers.md +++ b/laravel/documentation/controllers.md @@ -17,7 +17,7 @@ ## The Basics Controllers are classes that are responsible for accepting user input and managing interactions between models, libraries, and views. Typically, they will ask a model for data, and then return a view that presents that data to the user. -The usage of controllers is the most common method of implementingapplication logic in modern web-development. However, Laravel also empowers developers to implement their application logic within routing declarations. This is explored in detail in the [routing document](/docs/routing). New users are encourage to start with controllers. There is nothing that route-based application logic can do that controllers can't. +The usage of controllers is the most common method of implementing application logic in modern web-development. However, Laravel also empowers developers to implement their application logic within routing declarations. This is explored in detail in the [routing document](/docs/routing). New users are encourage to start with controllers. There is nothing that route-based application logic can do that controllers can't. Controller classes should be stored in **application/controllers** and should extend the Base\_Controller class. A Home\_Controller class is included with Laravel. @@ -40,7 +40,7 @@ #### Creating a simple controller: ## Controller Routing -It is important to be aware that all routes in Laravel must be explicitly defined, including routes to controllers. +It is important to be aware that all routes in Laravel must be explicitly defined, including routes to controllers. This means that controller methods that have not been exposed through route registration **cannot** be accessed. It's possible to automatically expose all methods within a controller using controller route registration. Controller route registrations are typically defined in **application/routes.php**. @@ -78,7 +78,7 @@ #### Registering a bundle's controller with the router: ## Action Filters -Action filters are methods that can be run before or after a controller action. With Laravel you don't only have control over which filters are assigned to which actions. But, you can also choose which http verbs (post, get, put, and delete) will activate a filter. +Action filters are methods that can be run before or after a controller action. With Laravel you don't only have control over which filters are assigned to which actions. But, you can also choose which http verbs (post, get, put, and delete) will activate a filter. You can assign "before" and "after" filters to controller actions within the controller's constructor. From ee4a1871b2626949fa549314fbf96e08ea53209b Mon Sep 17 00:00:00 2001 From: Ben James Date: Fri, 25 May 2012 09:45:46 +0100 Subject: [PATCH 7/8] Changed .gitignore in session to ignore all contents Signed-off-by: Ben James --- storage/sessions/.gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/storage/sessions/.gitignore b/storage/sessions/.gitignore index e69de29b..c96a04f0 100644 --- a/storage/sessions/.gitignore +++ b/storage/sessions/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore \ No newline at end of file From b4b9c1f4421a1e6d373942aa1ab6299d431b3631 Mon Sep 17 00:00:00 2001 From: AndrewBNZ Date: Wed, 30 May 2012 18:42:22 +1200 Subject: [PATCH 8/8] Fixes Laravel issue #727 - updated sqlserver grammar file to fix error in primary key function. --- laravel/database/schema/grammars/sqlserver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/laravel/database/schema/grammars/sqlserver.php b/laravel/database/schema/grammars/sqlserver.php index 0fb80f6a..6cc912f7 100644 --- a/laravel/database/schema/grammars/sqlserver.php +++ b/laravel/database/schema/grammars/sqlserver.php @@ -138,7 +138,7 @@ public function primary(Table $table, Fluent $command) { $name = $command->name; - $columns = $this->columnize($columns); + $columns = $this->columnize($command->$columns); return 'ALTER TABLE '.$this->wrap($table)." ADD CONSTRAINT {$name} PRIMARY KEY ({$columns})"; }