tastyigniter / ti-ext-api

Manages and generates RESTful APIs for TastyIgniter
MIT License
18 stars 22 forks source link

Validation Exception The model field is required Validation.php line 59 #32

Closed BreakSecurity closed 3 years ago

BreakSecurity commented 3 years ago

(1/1) Validation Exception The model field is required. in Validation.php line 59 at Resource->throwValidationException() in Validating Observer.php line 56

Tasty BETA.26

sampoyigi commented 3 years ago

Looks like an error from this PR #23?? Try the master branch or latest release.

BreakSecurity commented 3 years ago

@sampoyigi

on #23 branch

    Symfony\Component\Debug\Exception\FatalThrowableError: Class 'Laravel\Sanctum\Sanctum' not found
in /home/info/domains/info.info/public_html/test/extensions/igniter/api/Extension.php:23
Stack trace:
#0 /home/info/domains/info.info/public_html/test/app/system/classes/ExtensionManager.php(488): Igniter\Api\Extension->register()
#1 /home/info/domains/info.info/public_html/test/app/system/classes/ExtensionManager.php(755): System\Classes\ExtensionManager->registerExtension('igniter.api', Object(Igniter\Api\Extension))
#2 /home/info/domains/info.info/public_html/test/app/system/controllers/Extensions.php(150): System\Classes\ExtensionManager->installExtension('igniter.api')
#3 [internal function]: System\Controllers\Extensions->index_onInstall('index')
#4 /home/info/domains/info.info/public_html/test/app/admin/classes/AdminController.php(405): call_user_func_array(Array, Array)
#5 /home/info/domains/info.info/public_html/test/app/admin/classes/AdminController.php(262): Admin\Classes\AdminController->runHandler('onInstall', Array)
#6 /home/info/domains/info.info/public_html/test/app/admin/classes/AdminController.php(167): Admin\Classes\AdminController->processHandlers()
#7 /home/info/domains/info.info/public_html/test/app/system/classes/Controller.php(106): Admin\Classes\AdminController->remap('index', Array)
#8 /home/info/domains/info.info/public_html/test/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): System\Classes\Controller->runAdmin('extensions')
#9 /home/info/domains/info.info/public_html/test/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\Routing\Controller->callAction('runAdmin', Array)
#10 /home/info/domains/info.info/public_html/test/vendor/laravel/framework/src/Illuminate/Routing/Route.php(219): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(System\Classes\Controller), 'runAdmin')
#11 /home/info/domains/info.info/public_html/test/vendor/laravel/framework/src/Illuminate/Routing/Route.php(176): Illuminate\Routing\Route->runController()
#12 /home/info/domains/info.info/public_html/test/vendor/laravel/framework/src/Illuminate/Routing/Router.php(681): Illuminate\Routing\Route->run()
#13 /home/info/domains/info.info/public_html/test/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#14 /home/info/domains/info.info/public_html/test/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(78): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#15 /home/info/domains/info.info/public_html/test/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle(Object(Illuminate\Http\Request), Object(Closure))
#16 /home/info/domains/info.info/public_html/test/vendor/tastyigniter/flame/src/Currency/Middleware/CurrencyMiddleware.php(33): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#17 /home/info/domains/info.info/public_html/test/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Igniter\Flame\Currency\Middleware\CurrencyMiddleware->handle(Object(Illuminate\Http\Request), Object(Closure))
#18 /home/info/domains/info.info/public_html/test/app/admin/middleware/LogUserLastSeen.php(26): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#19 /home/info/domains/info.info/public_html/test/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Admin\Middleware\LogUserLastSeen->handle(Object(Illuminate\Http\Request), Object(Closure))
#20 /home/info/domains/info.info/public_html/test/vendor/tastyigniter/flame/src/Translation/Middleware/Localization.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#21 /home/info/domains/info.info/public_html/test/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Igniter\Flame\Translation\Middleware\Localization->handle(Object(Illuminate\Http\Request), Object(Closure))
#22 /home/info/domains/info.info/public_html/test/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(41): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#23 /home/info/domains/info.info/public_html/test/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\Routing\Middleware\SubstituteBindings->handle(Object(Illuminate\Http\Request), Object(Closure))
#24 /home/info/domains/info.info/public_html/test/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#25 /home/info/domains/info.info/public_html/test/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#26 /home/info/domains/info.info/public_html/test/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(56): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#27 /home/info/domains/info.info/public_html/test/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#28 /home/info/domains/info.info/public_html/test/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#29 /home/info/domains/info.info/public_html/test/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
#30 /home/info/domains/info.info/public_html/test/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#31 /home/info/domains/info.info/public_html/test/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
#32 /home/info/domains/info.info/public_html/test/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(105): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#33 /home/info/domains/info.info/public_html/test/vendor/laravel/framework/src/Illuminate/Routing/Router.php(683): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#34 /home/info/domains/info.info/public_html/test/vendor/laravel/framework/src/Illuminate/Routing/Router.php(658): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#35 /home/info/domains/info.info/public_html/test/vendor/laravel/framework/src/Illuminate/Routing/Router.php(624): Illuminate\Routing\Router->runRoute(Object(Illuminate\Http\Request), Object(Illuminate\Routing\Route))
#36 /home/info/domains/info.info/public_html/test/vendor/october/rain/src/Router/CoreRouter.php(20): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#37 /home/info/domains/info.info/public_html/test/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(170): October\Rain\Router\CoreRouter->dispatch(Object(Illuminate\Http\Request))
#38 /home/info/domains/info.info/public_html/test/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))
#39 /home/info/domains/info.info/public_html/test/vendor/tastyigniter/flame/src/Setting/Middleware/SaveSetting.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#40 /home/info/domains/info.info/public_html/test/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Igniter\Flame\Setting\Middleware\SaveSetting->handle(Object(Illuminate\Http\Request), Object(Closure))
#41 /home/info/domains/info.info/public_html/test/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#42 /home/info/domains/info.info/public_html/test/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Fideloper\Proxy\TrustProxies->handle(Object(Illuminate\Http\Request), Object(Closure))
#43 /home/info/domains/info.info/public_html/test/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#44 /home/info/domains/info.info/public_html/test/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure))
#45 /home/info/domains/info.info/public_html/test/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#46 /home/info/domains/info.info/public_html/test/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle(Object(Illuminate\Http\Request), Object(Closure))
#47 /home/info/domains/info.info/public_html/test/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(63): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#48 /home/info/domains/info.info/public_html/test/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#49 /home/info/domains/info.info/public_html/test/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(105): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#50 /home/info/domains/info.info/public_html/test/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(145): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#51 /home/info/domains/info.info/public_html/test/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(110): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#52 /home/info/domains/info.info/public_html/test/index.php(53): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#53 {main} 
ryanmitchell commented 3 years ago

I hit this issue a lot when I first worked on the api. You need to run composer update --lock from the root dir.

If that still doesn't work just add sanctum to the root composer.