I am using eloquent as part of a slim 3 project with slim-jwt-auth (https://github.com/tuupola/slim-jwt-auth), outside of Laravel. There are many situations where I want to control the items returned based on the user who is making the request.
From…
I am trying to write a function that would call multiple classes, each would add a widget to a single PDF file and then return that entire PDF file.
Here's the constructor's code:
So I'm trying to set up Phinx a database migrations tool in Slim however, I'm having a little trouble getting the migration to work properly it keeps giving me this error Fatal error: Class 'App\Database\Migrations\Migration' not found in…
When uploading images on my web application, images are stored in the /public/uploads/ directory. For those familiar with Slim Framework 3 the /public/ directory is where index.php is stored.
Simply navigating to http://website.com/uploads/image.png…
Hi I have the follwong dependencies:
$container['controller'] = function($c) use ($app) {
return new controller( $app );
};
$container['utils'] = function($c) use ($app) {
return new utils( $app );
};
$container['model'] = function($c) use…
In my Slim 3 Controller I use a function to return images from a non-public folder. I put the route to this Controller in an img tag like so:
Everything works fine as long as I access my webpage via WIFI.…
I have a route :
$app->get('/api/home',['\App\Controllers\HomepageController','getAllCards']);
In my App.php file, I have registered the service provider as:
$dependencies = [ 'cache' => function(Container $container) {
return…
I'm new to slim. I ran into an error telling me the callable controller does not exist. However my other controller (HomeController) does work. I'm sure I am doing something stupid but I can't figure out what.
Error Message
Type:…
I'm building a simple API based on Slim framework 3.8.1. I'm having an issue where the response is taking ~10 seconds to render. I've verified by process of elimination that it's the actual render of the response that's taking ~10 seconds--- it's…
In my app.php file:
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
class App extends \DI\Brifge\Slim\app
{
public function configureContainer(ContainerBuilder $builder)
{
$dependencies = [
'logger' => function (Container…
Has anyone managed to integrate PHPBB login system with a Slim 3 application?
I get the following error
Fatal error: Uncaught TypeError: Argument 1 passed to
Slim\Collection::__construct() must be of the type array, object
given
When adding…
I am using slim3 eloqent/laravel and am trying to build a query to delete an entry from the database using multiple where clauses.
According to laravel's documentation this query should delete correctly;
$deleteGalleryItem =…
I am building a simple chat system for users within my DB, and I want the user to be able to reply to messages, but to show in chronological order. I cannot get the nested foreach loop to show any results. Here is what i have so far.
Friends…
I am trying to implement http DELETE. The app is written with php and slim3 framework. The frontend is angular 2.
If the pattern looks like:$slimApp->delete('/delete', ...) everything is fine.
As soon as I introduce params like:…
How can I pass URI parameters in the route when using controller function?
For example:
$app->get('/api/courts/{id}/{date}',
'C:\xampp\htdocs\backend\App\Controllers\AvailabilityController:
getCourtAvailability'){
…