Questions tagged [Silex] (49)

2
answers

How to interact with the cookie for admin panel?

I have my own website. It had to make a admin panel, ie, when I type in /admin it opens a panel with the buns of the administrator (you need to pre-enter the username and password). I thought it might be to solve this using cookies? Ie if the username and password is correct, create a cookie admin=1, and check all the time ...
Amara.Skiles12 asked April 8th 20 at 18:02
1
answer

How to withdraw your silex 404 in php?

I came up with this thing after all vyuha:$app->get('/{other}', function() use($app) { return $app['twig']->render('404.twig'); }); But it works only on this url: site.domain/test, and on site.domain/test/test does not work. How can I fix it or have any other suggestions of implementation?
clifton_Strei asked March 30th 20 at 00:48
1
answer

Why is the INSERT function in a Doctrine gives 500 Internal Server Error?

Is a function of data insertion:$query = $app['qb']->insert('users') ->values( array( 'user' => '?', 'value' => '?' ) ) ->setParameter(0, $name) ->setParameter(1, $value) ; $query->execute(); When you call it via Ajax provides:POST localhost/users/add 500 (Internal Server Error) The problem is in $q...
jako asked March 18th 20 at 20:47
4
answers

How to access a field of a query?

Query$result = \Tablename::find_by_name($request->get('name')); The query runs successfully. Unable to access the fields, all except the nameprint($result->name); Throws an error that the name field no. How to reference this field?
Raphaelle.Osinski asked March 17th 20 at 09:53
0
answer

Silex DoctrineExtension not a monitor extension

Interested in the framework, though experience is getting worse and worse... But still interesting. When implementing the mini-project there was a desire to use doctrine dbal, actually what was the problem. When connecting the extension spits out an error that such is not present. Checked all already (although I think the ...
Allene_Crona78 asked October 10th 19 at 04:02
1
answer

Silex + Doctrine ORM — if you can't understand?

github.com/hell0w0rd/Test-Silex-App repository I don't understand how to use the console and generate a class for working with the database. The console gives [InvalidArgumentException] The helper "em" is not defined.github.com/dflydev/dflydev-doctrine-orm-service-pr... — here everything is clear so painted, that nothing is...
emelia63 asked October 3rd 19 at 17:39
5
answers

How to find supporters for opensource project (arranged by django orm in php)?

've been trying to write, know that it will be easier and faster than many available, there are achievements, but most do not have enough hands/ideas/criticism. all friends/friends are either too busy, or they broke the code for the code :) how and where better to make stuffing this idea? maybe there will be sympathy? extra...
rollin97 asked October 3rd 19 at 02:31
3
answers

The command in CRON: the script call url

Set up CRON. With timelines, like, figured out, but not clear with the teams. Within my task, you need to run the script. The script is located in silex controller. Is it possible to refer to it by url?
Vincenzo asked October 3rd 19 at 01:45
2
answers

Silex + Twig. Why not get the include block in template?

Hi For the first time tried to make part of the layout in a separate file, and includeth in the template. Develop on silex, using twig. The documentation twig everything seems simple:{% include 'header.html' %} Body {% include 'footer.html' %} http://twig.sensiolabs.org/doc/tags/include.html Inserting got the following err...
Vincenzo asked October 2nd 19 at 23:35
2
answers

And Silex SecurityServiceProvider: Task firewalls

Hi again. Faced in Silex SecurityServiceProvider. At the first step - there is a question the answer to which Google has failed. To connect SecurityServiceProvider need to place the following code:$app->register(new Silex\Provider\SecurityServiceProvider(), array( 'security.firewalls' => // see below ));(source: http...
Vincenzo asked October 2nd 19 at 23:26