In my Symofny project I want for my entity to have timestamp field. I want to be saved in timestamp format? How can I accomplish that? Like // => 1387909800 I am on Symfony 4.3 version. Answer Try getTimestamp();
Tag: symfony
Symfony Update data with a post request
I am currently trying to update a Person in a table. The Table looks the following: I want to be able to update the First-and Lastname and also the nin when I click on the Submit button. My twig file looks like this: And my controller is the following: Currently when I click update I just fill it what’s in
Error at login: This repository can be attached only to ORM sortable listener
I am currently verifying the operation by upgrading to Symfony 4.0. When I tried to log in by entering my ID and password, the following error message appeared. Is there anything you can think of? …
Symfony 4: ROLE_USER doesn’t inherit IS_AUTHENTICATED_FULLY and Voter throws AccessDeniedException
I’m working on a legacy project with a lot of ancient staffs. There’re huge numbers of actions which are used really rare. Half a year ago we upgraded from Symfony 2.8 to Symfony 4.4. All worked …
symfony – getting logged out at form->handleRequest
I have a problem regarding my Symfony4 App. What is happening? I want to build a “Change Password” function for the currently logged in user. So far everything is fine imo. When I submit the form everything seems to have worked fine (redirect to correct page, page is displayed, .. ). But when I want to navigate to another page
CollectionType elements missing data
I’ve embedded forms with CollectionType: and ‘battlePages’ is an ArrayCollection with many elements. But ‘$entity’ is empty however collection was walking through. My goal would be to get BattlePage entity’s data in the ‘BattlePageCollectionType’ which is my second in examples ($entity). Anybody had have similar issues? Answer The $builder->getData(); method doesn’t return an entity. You should use Form Events Example
Cron – bad minute errors in crontab file, can’t install
So I have a cron file sms.cron that I want to execute every 15 minutes that looks like that: 15 * * * * docker-compose exec php bin/console app:send-sms I do not precise the path to the command …
Is there way to pass Symfony variables to translation without keys
we are now using custom translations for our project in PHP and I want to migrate them to Symfony ones. Everything looks great, but my only concern is that variable placeholders needs key to bind successfully, can I somehow change the code to accept translation variables in sequence (without keys)? Let me show an example: Our code now: But this
Unable to find template Symfony 4
When I updated from Symfony 3.4 to Symfony 4 and displayed the system with a browser, the following error appeared. Changing the views directory is a lot of work and I don’t want to do it as much as possible. Is there any good way? Error Code Code framework.yaml twig.yaml SecurityController.php Version Symfony 4.0 PHP 7.3 twig/twig 2.14 twig/templating 4.0
Connection refused to database (Symfony 5) [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed last year. Improve this question I’m trying to connect my database to my app with Symfony but I keep getting errors. I specify that it’s not a local database. Also, I’m