How to Create Blog Items in Symfony 6 | How to Create a Blog in Symfony | Symfony 6 for Beginners

  Рет қаралды 9,741

Code With Dary

Code With Dary

Күн бұрын

Пікірлер: 31
@inanyt
@inanyt Жыл бұрын
Thank you for this series, great videos. I have to say though, the input labels are very important for accessibility, and you should never disable the labels for form fields. A placeholder is not the same thing as the label. If you don't want the label, you can make it readable by screen readers only. Search for the .visually-hidden style implementation. I think you can use the label_attr option, which is very similar to the attr option, to add classes to your labels.
@codewithdary
@codewithdary Жыл бұрын
Thank you thank you bud :)
@ilyasbakirov
@ilyasbakirov 2 жыл бұрын
Also found strange things that if you place *show()* function before *create()* function in the controller and whenever you visit /movies/create in the browser the *create()* function executed instead of *show()* function
@Kuma333
@Kuma333 Жыл бұрын
Thanks, otherwise I could not understand why the show page is displayed, do you know why it works like this?
@manguitodelicioso
@manguitodelicioso Жыл бұрын
What about creating each controller in its own file ? I'm not having any issue related to it.
@tomasvaitkevicius4191
@tomasvaitkevicius4191 5 ай бұрын
@@Kuma333 Late answer, but it is because in "show" method you have a variable after "/movies/" and it is placed before your "create" method, so it basically accepts anything you put in place after "/movies/" and does not bother to look further into other methods. Placement is important in routing, same applies also on laravel.
@_bigs5627
@_bigs5627 3 ай бұрын
@@tomasvaitkevicius4191 ty bro i get it now
@nipph
@nipph 2 жыл бұрын
Is adding css classes in Form class compatible with MVC pattern? I would personally prefer to have them in my views, makes code (and later desing) clearer.
@codewithdary
@codewithdary 2 жыл бұрын
I definitely get your point, but a form type has not that much to do with MVC, it’s basically a helper you make your HTML less, clustered. But it would definitely be a valid argument though, don’t get me wrong!
@ilyasbakirov
@ilyasbakirov 2 жыл бұрын
@@codewithdary I agree that FormType is helper class and makes easy development but also find logic with @nipph to separate privileges of development. Design developers (designer) involved or out-soused focuses at (css, jjs, buttons, themes end etc) in views part
@taylan5376
@taylan5376 2 жыл бұрын
Well you could ask also where is the model. Controller not means to send queries to database but get result from models. Database queries or cache or other things is "model" work in MVC structure. :) Here you can see everything in controller function :)
@sakshyanigam972
@sakshyanigam972 Жыл бұрын
Hello, when I use tailwind classes in the form type builder, these classes are not working. please help me out!. Thanks in advanced. 🙏
@codewithdary
@codewithdary Жыл бұрын
One issue might be that the classes are not loaded properly or there may be a conflict with other CSS styles
@YassineNDv
@YassineNDv Жыл бұрын
is there any specific order we need to follow , it's weird that when i keep the function show first and the write the create funciton next , it gives me an error as if it open the show.html.twig ? greatful if anyone can answer
@codewithdary
@codewithdary Жыл бұрын
From my understanding, the order of the CRUD methods in a controller does not matter for it to work. As long as the controller is properly configured and the necessary routes are defined, the order of the methods should not affect the functionality of the controller.
@manguitodelicioso
@manguitodelicioso Жыл бұрын
Hi Dary, I continue to watch your Symfony 6 video series very carefully because I find it very helpful. A question out of curiosity. How could I change the default language of the form validation warnings, which is English, to a different one? For example, I would like to change; "Please fill out this field" to "Por favor llene este campo." Would you give me some clue or piece of advice ? UPDATE: I got the validation warnings translated to the wrong called Spanish language. Actually, it is Castillian or Castellano.
@LordDan1989
@LordDan1989 2 жыл бұрын
I must be missing something. I understand the value of ORM, and other features that these Frameworks provide. I really like the Route annotations and you were pretty quick to get all of that stuff set up. But then ( and this isn't a specific to you, your development style or choice a tools) I get completely lost when we then spend hours setting up loads of additional libraries just to get a H1 and img src on the screen. Why are we compiling assets? Why are we using Encore? Why all of this extra bloat that has resulted in this series of videos of taking up to video 16 just to get a h1 and img src on screen? The value of this is clearly going straight over my head and I'm wanting to understand it.
@codewithdary
@codewithdary 2 жыл бұрын
I installed a Symfony skeleton projects in the beginning of the course, which means that most needed packages aren't installed by default. symfony.com/doc/current/setup.html
@Rawnaf-adiba
@Rawnaf-adiba Жыл бұрын
Thanks sir
@codewithdary
@codewithdary Жыл бұрын
Welcome!!
@hekmatyar9691
@hekmatyar9691 2 жыл бұрын
Hello, could you continue lessons with relation actors?
@codewithdary
@codewithdary 2 жыл бұрын
Currently working on another series :(
@dioxino76
@dioxino76 Жыл бұрын
Does anybody know how to make a post editor (Symfony 6, for instance) with a wysiwyg editor, please? Thanks.
@codewithdary
@codewithdary Жыл бұрын
From scratch? I would just recommend a package that you could use.
@dioxino76
@dioxino76 Жыл бұрын
@@codewithdary Which one?
@aleksandarkrasic8324
@aleksandarkrasic8324 10 ай бұрын
Getting form and submit form request in same method is a bad practice. That method should be either GET or POST
2 жыл бұрын
Hello Dary, thank you so much for creating this amazing tutorial. It helped me a lot to understand and to start working with Symfony. I've passed all the episodes and I'm wondering can you show me how to use the commented line in MovieFormType ->add('actors'). I've search all the repo but there is no mention about how to add the actor via same form. I'm doing my own app folliwing your tutorial but when I want to add the Author on the Book via BookFormType I get the error Doctrine\Common\Collections\ArrayCollection::__construct(): Argument #1 ($elements) must be of type array, string given, called in [...]/symfony/libapp/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php on line 679 and I used this: ->add('author', TextType::class, [ 'attr' => array( 'class' => 'bg-transparent block mb-16 border-b-2 w-full h-16 text-3xl outline-none', 'placeholder' => 'Enter Author' ), 'label' => false, 'required' => false ]) as you did used that on other properties. What am I missing here? Can you point me where to find out more about this problem or show how to deal with adding other properties that have relations.
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 45 МЛН
My scorpion was taken away from me 😢
00:55
TyphoonFast 5
Рет қаралды 2,7 МЛН
Мясо вегана? 🧐 @Whatthefshow
01:01
История одного вокалиста
Рет қаралды 7 МЛН
Symfony Messenger plus RabbitMQ
11:32
Gary Clarke
Рет қаралды 17 М.
Creating a Blog with Symfony 6 - How to start
17:34
Symbolic Link
Рет қаралды 18 М.
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 45 МЛН