Skip to content

Instantly share code, notes, and snippets.

@phillipsharring
Last active May 19, 2016 13:38
Show Gist options
  • Save phillipsharring/6f9d41cd7faade8de337d3a0c628da1e to your computer and use it in GitHub Desktop.
Save phillipsharring/6f9d41cd7faade8de337d3a0c628da1e to your computer and use it in GitHub Desktop.
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.2.*",
"laravel/cashier": "~6.0",
"laravel/spark": "*@dev",
"guzzlehttp/guzzle": "^6.2",
"laravelcollective/html": "^5.2",
"johnpbloch/wordpress": "4.2",
"jgrossi/corcel": "^1.0",
"composer/installers": "^1.0",
"wpackagist-plugin/meta-box": "4.8.5"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0",
"symfony/css-selector": "2.8.*|3.0.*",
"symfony/dom-crawler": "2.8.*|3.0.*"
},
"extra": {
"wordpress-install-dir": "public/wp",
"installer-paths": {
"public/wp/wp-content/plugins/{$name}/": [
"type:wordpress-plugin"
],
"public/wp/wp-content/themes/{$name}/": [
"type:wordpress-theme"
]
}
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
},
"scripts": {
"post-root-package-install": [
"php -r \"copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
],
"post-install-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postInstall",
"php artisan optimize"
],
"post-update-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
"php artisan optimize"
]
},
"config": {
"preferred-install": "dist"
},
"repositories": [
{
"type": "path",
"url": "./spark"
},
{
"type":"composer",
"url":"https://wpackagist.org"
}
]
}
<?php
// app/Http/routes.php
use App\Model\Post;
Route::get('posts/{id}-{slug}', function($id, $slug) {
$post = Post::find($id);
dd($post);
});
<?php
// app/Model/Post.php
namespace App\Model;
class Post extends \Corcel\Post
{
protected $connection = 'wordpress';
}

ErrorException in Model.php line 3467:

Undefined property: Purcella\Model\Post::$meta

  1. in Model.php line 3467
  2. at HandleExceptions->handleError('8', 'Undefined property: Purcella\Model\Post::$meta', 'C:\Users\phil\Code\laravel-wp\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Model.php', '3467', array('key' => 'meta', 'this' => object(Post))) in Model.php line 3467
  3. at Model->__isset('meta') in Post.php line 198
  4. at Post->__get('meta') in Post.php line 199
  5. at Post->__get('softDelete') in Post.php line 182
  6. at Post->newQuery() in Model.php line 3498
  7. at Model->__call('find', array('1'))
  8. at Post->find('1')
  9. at call_user_func_array(array(object(Post), 'find'), array('1')) in Model.php line 3514
  10. at Model::__callStatic('find', array('1')) in routes.php line 35
  11. at Post::find('1') in routes.php line 35
  12. at RouteServiceProvider->{closure}('uncategorized', '1', 'hello-world')
  13. at call_user_func_array(object(Closure), array('categories' => 'uncategorized', 'id' => '1', 'slug' => 'hello-world')) in Route.php line 158
  14. at Route->runCallable(object(Request)) in Route.php line 137
  15. at Route->run(object(Request)) in Router.php line 724
  16. at Router->Illuminate\Routing{closure}(object(Request))
  17. at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
  18. at Pipeline->Illuminate\Routing{closure}(object(Request)) in VerifyUserHasTeam.php line 22
  19. at VerifyUserHasTeam->handle(object(Request), object(Closure))
  20. at call_user_func_array(array(object(VerifyUserHasTeam), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
  21. at Pipeline->Illuminate\Pipeline{closure}(object(Request))
  22. at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
  23. at Pipeline->Illuminate\Routing{closure}(object(Request)) in CreateFreshApiToken.php line 41
  24. at CreateFreshApiToken->handle(object(Request), object(Closure))
  25. at call_user_func_array(array(object(CreateFreshApiToken), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
  26. at Pipeline->Illuminate\Pipeline{closure}(object(Request))
  27. at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
  28. at Pipeline->Illuminate\Routing{closure}(object(Request)) in VerifyCsrfToken.php line 64
  29. at VerifyCsrfToken->handle(object(Request), object(Closure))
  30. at call_user_func_array(array(object(VerifyCsrfToken), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
  31. at Pipeline->Illuminate\Pipeline{closure}(object(Request))
  32. at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
  33. at Pipeline->Illuminate\Routing{closure}(object(Request)) in ShareErrorsFromSession.php line 49
  34. at ShareErrorsFromSession->handle(object(Request), object(Closure))
  35. at call_user_func_array(array(object(ShareErrorsFromSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
  36. at Pipeline->Illuminate\Pipeline{closure}(object(Request))
  37. at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
  38. at Pipeline->Illuminate\Routing{closure}(object(Request)) in StartSession.php line 62
  39. at StartSession->handle(object(Request), object(Closure))
  40. at call_user_func_array(array(object(StartSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
  41. at Pipeline->Illuminate\Pipeline{closure}(object(Request))
  42. at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
  43. at Pipeline->Illuminate\Routing{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 37
  44. at AddQueuedCookiesToResponse->handle(object(Request), object(Closure))
  45. at call_user_func_array(array(object(AddQueuedCookiesToResponse), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
  46. at Pipeline->Illuminate\Pipeline{closure}(object(Request))
  47. at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
  48. at Pipeline->Illuminate\Routing{closure}(object(Request)) in EncryptCookies.php line 59
  49. at EncryptCookies->handle(object(Request), object(Closure))
  50. at call_user_func_array(array(object(EncryptCookies), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
  51. at Pipeline->Illuminate\Pipeline{closure}(object(Request))
  52. at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
  53. at Pipeline->Illuminate\Routing{closure}(object(Request))
  54. at call_user_func(object(Closure), object(Request)) in Pipeline.php line 103
  55. at Pipeline->then(object(Closure)) in Router.php line 726
  56. at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 699
  57. at Router->dispatchToRoute(object(Request)) in Router.php line 675
  58. at Router->dispatch(object(Request)) in Kernel.php line 246
  59. at Kernel->Illuminate\Foundation\Http{closure}(object(Request))
  60. at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
  61. at Pipeline->Illuminate\Routing{closure}(object(Request)) in CheckForMaintenanceMode.php line 44
  62. at CheckForMaintenanceMode->handle(object(Request), object(Closure))
  63. at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
  64. at Pipeline->Illuminate\Pipeline{closure}(object(Request))
  65. at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
  66. at Pipeline->Illuminate\Routing{closure}(object(Request))
  67. at call_user_func(object(Closure), object(Request)) in Pipeline.php line 103
  68. at Pipeline->then(object(Closure)) in Kernel.php line 132
  69. at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 99
  70. at Kernel->handle(object(Request)) in index.php line 54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment