…but when I got here I saw you have implemented "stimulus_controller", but going back to the courses I do not see this implementation explained anywhere. What you did in the first course was to add a questionVote method to the QuestionController and up/downvote…
…try to debug the argument that is supplied to that foreach - you can use "dd($variableName)" to dump the variable. Then, try to debug why you're passing there not an array and where. Then, it should be easy to fix.
I hope this helps…
…some "task[tech]" data for the technician. But, i believe that you are not actually sending the technician "id" anywhere in the POST data. I could *totally* be wrong about that part - and I hope I am. Somehow you DO need to communicate the "tech…
|
|
// ... lines 1 - 11
|
|
class CheeseListingIsPublishedExtension implements QueryCollectionExtensionInterface, QueryItemExtensionInterface |
|
{ |
|
private $security; |
|
|
|
public function __construct(Security $security) |
|
{ |
|
$this->security = $security; |
|
} |
|
|
|
public function applyToCollection(QueryBuilder $queryBuilder, QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, string $operationName = null) |
|
{ |
|
$this->addWhere($queryBuilder, $resourceClass); |
|
} |
|
|
|
public function applyToItem(QueryBuilder $queryBuilder, QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, array $identifiers, string $operationName = null, array $context = []) |
|
{ |
|
$this->addWhere($queryBuilder, $resourceClass); |
|
} |
|
|
|
private function addWhere(QueryBuilder $queryBuilder, string $resourceClass): void |
|
{ |
|
if ($resourceClass !== CheeseListing::class) { |
|
return; |
|
} |
|
|
|
if ($this->security->isGranted('ROLE_ADMIN')) { |
|
return; |
|
} |
|
|
|
$rootAlias = $queryBuilder->getRootAliases()[0]; |
|
|
|
if (!$this->security->getUser()) { |
|
$queryBuilder->andWhere(sprintf('%s.isPublished = :isPublished', $rootAlias)) |
|
->setParameter('isPublished', true); |
|
} else { |
|
$queryBuilder->andWhere(sprintf(' |
|
%s.isPublished = :isPublished |
|
OR %s.owner = :owner', |
|
$rootAlias, $rootAlias |
|
)) |
|
->setParameter('isPublished', true) |
|
->setParameter('owner', $this->security->getUser()); |
|
} |
|
} |
|
} |
See Code Block in Script
…Swagger doesn't display parent_id. I'm wondering if this is just a documentation problem (it does not show in swagger but DOES exist when using the API endpoint) or if the field does not show anywhere.
Also, you mentioned that you're expecting…
…processed in the same application? So far, submitting the 'employee' login form doesn't submit any form data to anywhere that I can tell. Tried using http_basic_ldap and there seemed to be session conflicts between the two types of users, not exactly sure…
…is this one: "Module not found". The module in this case is actually the image file!
What does your CSS code look like and where is your image relative to your CSS file? Double-check the path. It could be something more subtle or deeper…
…etc ... ). So a user should be able to connect from anywhere by calling /authentication_token and put the token as Bearer token inside the next request.
How should I store user email and password on my frontend ? How should I manage JWT expiration and refreshing…
…general - it should activate ESI for your entire system, not just for the App namespace. Do you have `framework.esi` config anywhere else in your app? I want to make sure that you don't have ESI *disabled* on accident in the "dev" environment. Otherwise…
…the api will be located on api.example.com and the client on example.com. In this case api will not provide a cookie, because it's not a samesite. You said that you will explain this later, but I can't see this anywhere.
…an email: something is not working... when I wanted to see elephant.
I will probably go to prod.log and see all errors within last few days as he didnt specified time and where exactly he couldnt see elephant.
What I would like to do…
…method not parsing the template twice ? (like the styles where we need to manually reset)
I haven't found any related issues anywhere in the comments nor google and even though I could continue restarting my worker on local, it is getting somewhat annoying and…
…not aware of anything. The important piece in this video is that we're creating a custom field (` UserSelectTextType`) and adding the `attr` option to *its* `configureOptions()` method. We're *not* adding it in the main form class anywhere - e.g. `ArticleFormType`. This allows us…
…answer I think I might *not* use roles for this! Here's the important point: if you forget about security for a minute and pretend that we're not storing *any* roles *anywhere* in the database, you *already* have enough information to know which user…
…since we need to add a dev and prod config anyway. The other channels in the prod and dev monolog.yaml files are not declared at the top level and don't appear to be anywhere else either (or my grep is failing in vendor)
…a service (that's what the second section does) and activating autowiring (and autoconfiguration) for all services registered in this file (that's the first part). That's why, if you put something anywhere outside of src/, this won't work. As a best-practice…
|
|
// ... lines 1 - 11
|
|
class CheeseListingIsPublishedExtension implements QueryCollectionExtensionInterface, QueryItemExtensionInterface |
|
{ |
|
|
// ... lines 14 - 20
|
|
public function applyToCollection(QueryBuilder $queryBuilder, QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, string $operationName = null) |
|
{ |
|
$this->addWhere($queryBuilder, $resourceClass); |
|
} |
|
|
// ... lines 25 - 30
|
|
private function addWhere(QueryBuilder $queryBuilder, string $resourceClass): void |
|
{ |
|
if ($resourceClass !== CheeseListing::class) { |
|
return; |
|
} |
|
|
|
if ($this->security->isGranted('ROLE_ADMIN')) { |
|
return; |
|
} |
|
|
|
$rootAlias = $queryBuilder->getRootAliases()[0]; |
|
$queryBuilder->andWhere(sprintf('%s.isPublished = :isPublished', $rootAlias)) |
|
->setParameter('isPublished', true); |
|
} |
|
} |
See Code Block in Script
…you have, for some strange reason, invalid users on your Database. If that's not the case, then I'm missing something, probably would be useful if I can see your code. Just upload to anywhere (Github) and send me a link to it :)
Cheers!
…issue on API Platform where I recommended adding something that would look more like `access_control="ROLE_USER"`, but I'm not sure if it will go anywhere. The problem is that using the "expression language" (the way it is now) is useful in some…
…asnwer how to do that but it did not worked with date strings when they were parameters, but I have made a fix, did not test much, but maybe it will work. Then will need to find more convenient way to access it from anywhere.
x
517