Questions tagged [slim]

Slim for PHP is a RESTful micro framework for PHP 5 inspired by Sinatra.

Filter by
Sorted by
Tagged with
3
votes
2answers
66 views

Using PHP goto Labels for code folding

I've been using PHP labels in my Controllers for code folding. PHP labels are actually used with goto statements. But I'm using labels only because it's so much ...
0
votes
1answer
32 views

Is there any better / improved / optimise way to approach these input checker? [closed]

Actually I got a form with multiple input (around 39) on which I wish to perform some check and display customs messages based on sets of conditions. I found a way to address my problem but I'm ...
1
vote
0answers
202 views

Implement versioning of a RESTful API with PHP/Slim and Apache

I want to create a RESTful API with Apache/PHP and the Slim Framework (3.x). The API should support URI-based versioning like ...
0
votes
1answer
386 views

PHP OOP MVC Project Structure

I'm a beginner in OOP and PHP frameworks. I used slim skeleton to create a project and designed the project in this way. Project structure is given by the slim skeleton. Object Mappers are added by ...
3
votes
1answer
146 views

PHP RESTful API for a student repository

All of the codes are based on the PSR-2 standard. Also Dependency-Injection and Repository patterns are followed. I would love to hear some advices or comments. StudentRepository Class ...
0
votes
1answer
439 views

MVC Auth Structure and Dependency Injection with PHP-DI 5 and Slim 3

I'm creating an authentication with the Slim 3 framework and PHP-DI 5 (PHP-DI/PHP-DI). The project will be the base/starter template for my new projects. I want it to be easy to extend, also to ...
1
vote
1answer
74 views

Restful resource with pagination and additional mapping

I have this script that i use to get all clients with their events, main thing here is that i need to return all clients that have some events in specific periods and also i need to show clients that ...
0
votes
2answers
93 views

Paginated method to get all items

I'm using slim php and i have this simple paginated end point to get all clients, i feel like i could do some things here better, so i would appreciate all suggestions, if possible please give me code ...
1
vote
1answer
243 views

Secure login and authentication in PHP

This seems to work for me, but I want to make it more secure. I want to see how far I can go without pre-built packages/bundles, so please don't suggest any. How secure is this? What are some steps I ...
1
vote
0answers
708 views

MVC architecture for a Slim application

(https://github.com/trvshrmn/slim) This is more of an entire project review... if this is 'off topic' I apologize. I attempted to make Slim into an mvc structure. I added a few controllers, views and ...
1
vote
2answers
65 views

Form validation for user account creation

What would be a cleaner way to write the following? ...
0
votes
1answer
103 views

Initial stages of MVP, is the bootstrap file efficient coding

I am attempting to put my new OOP skills to the test and am eventually going to build a simple OOP login/registration system. However as I am making use of OOP I have decided to make my own simple ...
1
vote
0answers
125 views

Loading middlewares dynamically

Recently, I started playing a bit with Slim and what is making me confused is a necessity of container and middlewares hard coding. As because I am a staunch supporter of a dynamic loading I decided ...
0
votes
1answer
3k views

Slim 3 dynamic middleware code optimisation

Recently I started playing a bit with Slim and what is making me confused is a necessity of container and middlewares hard coding. As because I am a staunch supporter of a dynamic loading I decided ...
2
votes
1answer
3k views

Global site settings middleware for Slim Framework 3

I have created this middleware code for slim. I just want to know that is this right way to store site settings globally. so, I can use where ever I want. What do you think about my class structure ...
3
votes
1answer
655 views

Table rendering helper

I wrote this little helper to render a table, however, working with nested content_tag is messy. ...