Skip to content

Conversation

ObaydaAlesawi
Copy link
Contributor

I tried to add a namespace for Models, but there was a namespacing error in the controller file.

Expected import:

use App\Models\Post;

Current import:

use App\Admin\Post;

draft.yaml used file:

models:
   Models\Post:
     title: string:400
     content: longtext

 controllers:
   Admin\Post:
     index:
       query: all
       render: post.index with:posts

     store:
       validate: title, content
       save: post
       flash: post.title
       redirect: post.index

Those changes should solve the problem as I tried it locally
Thanks!

@ObaydaAlesawi ObaydaAlesawi changed the title fix models namespace issues Fix models namespace issues Apr 17, 2020
@ObaydaAlesawi ObaydaAlesawi changed the title Fix models namespace issues fix models namespace issues Apr 17, 2020
@jasonmccreary
Copy link
Collaborator

@nathane can you review this. I thought what you did in #121 got this...

@jasonmccreary jasonmccreary merged commit 6faf201 into laravel-shift:master Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants