This is a simple Slim 3 application that manages a list of books

Overview

Slim Bookshelf

This is a simple Slim 3 application that manages a list of books

Composer

This project uses Composer. Run composer install to install the dependencies.

Vagrant

To use the Vagrant VM, install Vagrant, Virtual Box & the VirtualBox Extension Pack.

  1. vagrant up
  2. navigate to http://localhost:8888

Cloud Foundry

You can deploy this app to Cloud Foundry with cf push. Look in manifest.yml and .bp-config/options.json for configuration.

Comments
  • Added favicon from https://favicon.io/emoji-favicons/books

    Added favicon from https://favicon.io/emoji-favicons/books

    • nice books favicon from https://favicon.io/emoji-favicons/books
    • prevents the code from running past the file exists check in public/index.php because favicon does not exist

    https://github.com/akrabat/slim-bookshelf/blob/16984915687943c15caf5c85a7d11d299d03796f/public/index.php#L4-L12

    opened by 8ctopus 4
  • Autoload in composer.json

    Autoload in composer.json

    I think it's bad idea use full path to Bookshelf dir in composer autoload, because if someone wants to add some functional it can be very confusing. https://github.com/akrabat/slim-bookshelf/blob/master/composer.json#L19

    opened by stdex 3
  • Seems not to work for me at all...

    Seems not to work for me at all...

    Php version 5.5.6. I'm keep seeing white screen of death without errors from start. When registering error handler, I've got:

    Type: LogicException
    Message: Cache can only be a string, false, or a Twig_CacheInterface implementation.
    File: \vendor\twig\twig\lib\Twig\Environment.php
    Line: 269
    

    first, when changed cache to "false" instead of null:

    Type: InvalidArgumentException
    Message: Database [default] not configured.
    File:\vendor\illuminate\database\DatabaseManager.php
    Line: 246
    

    What's wrong? Of course everything is set, settings file parsed ok, DB exists and login details are correct.

    opened by vovan47 2
  • Added sqlite3 instructions to readme

    Added sqlite3 instructions to readme

    hello Rob,

    Thought adding sqlite3 instructions to readme can be useful for novices. Also added a small section that describes what components you're using in the project.

    opened by 8ctopus 1
  • fixed: php 8 fatal error in twig library

    fixed: php 8 fatal error in twig library

    Thank you for creating the sample project, it's very useful to get a head start with the slim framework.

    I noticed a fatal error with the twig library on php 8, composer update twig\twig fixes it.

    ( ! ) Fatal error: Unparenthesized `a ? b : c ? d : e` is not supported. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in K:\dev\github\slim-bookshelf\vendor\twig\twig\lib\Twig\Node.php on line 42
    
    opened by 8ctopus 1
  • cd: /vagrant/vm-provisioning: No such file or directory

    cd: /vagrant/vm-provisioning: No such file or directory

    Hi.

    I'm trying to run this app but "sudo vagrant up" is failing at the last hurdle...

    default: Running: inline script
    

    ==> default: /tmp/vagrant-shell: line 1: cd: /vagrant/vm-provisioning: No such file or directory

    Any pointers as to how to sort this would be much appreciated.

    Thanks,

    Dan

    opened by jdanosborne 1
  • Update layout.twig

    Update layout.twig

    base_url would produce the wrong url when click on any link other than the root, with path_for it will work no matter which link you click.

    This due to the base_url changes base on where it is at not the true "root" of the base_url

    opened by chanhong 1
  • Using PDO instad of Eloquent?

    Using PDO instad of Eloquent?

    Im trying to remove Eloquent from your app, and instead using PDO

    But I´m having a hard time figuring out how the Model would look like, to initiate the PDO instance from the model.

    <?php
    namespace Bookshelf;
    use PDO
    final class Book
    {
        protected $db;
    
        public function __construct(PDO $db)
        {
            $this->db = $db;
        }
    
        public static function find($id)
        {
            $sql = "SELECT * FROM books WHERE id = :id";
            $query = $db->prepare($sql);
            $query->execute(array(':id' => $id));
    
            return $query->fetchAll();
        }
    }
    

    How would can this be done? Thanks in advance!

    opened by ArneAnka 0
  • save() throws internal server error

    save() throws internal server error

    When I try to save model, I get internal server error, and can't catch error at all. My model have only two columns, id pk autoincrement and name (string 255) this is my settup:

    Model:

    class Version extends Illuminate\Database\Eloquent\Model
    {
        protected $table = 'version';
    
        protected $fillable = ['name'];
    
        protected $hidden = ['id'];
    }
    

    Action:

    public function create(RequestInterface $request, ResponseInterface $response)
        {
            $params = $request->getParsedBody();
            $class = $this->model; // App\Models\Version
            $model = new $class();
            $model->fill($params);
    
            return $model->save() ?
                $this->success($response, "{$this->getModelName()} successfully saved.") :
                $this->error($response, $model->errors());
    
        }
    

    I manager to localize issue, by adding break points, to this part of code in Illuminate\Database\Eloquent\Builder line #1242

    if (in_array($method, $this->passthru)) {
                return call_user_func_array([$this->toBase(), $method], $parameters);
            }
    

    But I have no idea what is wrong

    opened by dzona 1
Owner
Rob Allen
Consultant, developer & trainer for @19FT
Rob Allen
A simple web application for seeing a store's books. Built with Laravel 8 (a PHP Framework).

HappyBookStore Happy Book Store is a simple web application for seeing a store's books. As a user, you can look what book is available in the store by

Ananda Bilal 0 Jan 31, 2022
Slim 3 PHP micro framework MVC application boilerplate

Slim 3 PHP micro framework MVC application boilerplate

Jim Frenette 24 Oct 8, 2022
Updated project with extra Features like WISHLIST, List Orders, add Reviews, updated routing, resolved search bug is available for Premium

Updated project with extra Features like WISHLIST, List Orders, add Reviews, updated routing, resolved search bug is available for Premium Projects We

Franck Thiam 1 Nov 23, 2021
Official repository for Find A PR. Find A PR is a platform that curates a list of issues around Laravel based project.

About Find A PR This is the official repository for Find A PR. Find A PR is a platform that curates a list of issues around Laravel based project. Req

Ash Allen 33 Dec 15, 2022
TODO List is a task management system

TODO List is a task management system. It allows you to create tasks, change their statuses and put labels. Registration and authentication are required to work with the system.

Yana 0 Jul 21, 2022
This application is a simple application to watch movies like Netflix or DisneyPlus.

Movie Streaming React Web Apps This application is a simple application to watch streaming movies like Netflix or DisneyPlus. The application is built

Adim 2 Sep 25, 2022
Public append-only ledger microservice built with Slim Framework

Chronicle is a self-hostable microservice, built with Slim Framework, which enables authorized users to commit arbitrary data to an immutable, append-only public ledger.

Paragon Initiative Enterprises 460 Dec 22, 2022
A slim, lean forum package designed for quick and easy integration in Laravel projects

Complete documentation is available on teamteatime.net. Installation Requires Laravel 6+ and PHP 7.4+. Step 1: Install the package Install the package

TeamTeaTime 486 Dec 31, 2022
UserFrosting is a secure, modern user management system written in PHP and built on top of the Slim Microframework, Twig templating engine, and Eloquent ORM.

UserFrosting 4.6 Branch Version Build Coverage Style master hotfix develop https://www.userfrosting.com If you simply want to show that you like this

UserFrosting 1.6k Jan 1, 2023
Damn Vulnerable Web Application (DVWA) is a PHP/MySQL web application that is damn vulnerable.

Damn Vulnerable Web Application (DVWA) is a PHP/MySQL web application that is damn vulnerable. Its main goal is to be an aid for security professionals to test their skills and tools in a legal environment, help web developers better understand the processes of securing web applications and to aid both students & teachers to learn about web application security in a controlled class room environment.

Robin Wood 7k Jan 5, 2023
TinyFileManager is web based file manager and it is a simple, fast and small file manager with a single file, multi-language ready web application

TinyFileManager is web based file manager and it is a simple, fast and small file manager with a single file, multi-language ready web application for storing, uploading, editing and managing files and folders online via web browser. The Application runs on PHP 5.5+, It allows the creation of multiple users and each user can have its own directory and a build-in support for managing text files with cloud9 IDE and it supports syntax highlighting for over 150+ languages and over 35+ themes.

Prasath Mani 3.5k Jan 7, 2023
A simple, beautiful, mobile-first instant messaging web application backend build with ThinkPHP6 and Swoole.

OnChat A simple, beautiful, mobile-first instant messaging progressive web application build with ThinkPHP6 and Swoole. You can click here to view the

HyperLifelll9 138 Dec 26, 2022
A simple, proof-of-concept Laravel blog application powered by a MongoDB ORM.

Mongoblog A simple, proof-of-concept Laravel blog application powered by a MongoDB ORM. Separated API and front-end This is a RESTful application, who

Jayps 4 Nov 8, 2022
Laravel Angular Time Tracker is a simple time tracking application built on Laravel 5.2, Angular 2, and Bootstrap 3.

Laravel 5.2, Angular 2, and Bootstrap 3.3.* Time Tracker Laravel Angular Time Tracker is a simple time tracking application built on Laravel 5.2, Angu

Jeremy Kenedy 25 Oct 11, 2022
MINI is an extremely simple and easy to understand skeleton PHP application

MINI MINI is an extremely simple and easy to understand skeleton PHP application, reduced to the max. MINI is NOT a professional framework and it does

Chris 1.3k Dec 22, 2022
Simple Laravel Invoice Generator Sling — open-source web application that helps you create invoices and track income.

Simple Laravel Invoice Generator Sling — open-source web application that helps you create invoices and track income. Table of Contents About

Ray Icemont 4 Nov 22, 2022
A simple web application that demonstrates how to quickly connect to and communicate with a MariaDB database using PHP

PHP Quickstart This repository contains a simple web application that demonstrates how to quickly connect to and communicate with a MariaDB database u

Developer Code Central 8 Nov 6, 2022
A simple wrapper for PHP Intervention Library to provide a more simple interface and convenient way to convert images to webp

This package is a simple wrapper for PHP Intervention Library to provide a more simple interface and convenient way to convert images to webp - next generation format - extension, and resize them to render only needed sizes.

eyad hamza 18 Jun 28, 2022
Simple-cache - PHP FIG Simple Cache PSR

PHP FIG Simple Cache PSR This repository holds all interfaces related to PSR-16. Note that this is not a cache implementation of its own. It is merely

PHP-FIG 8k Jan 3, 2023