Giter Site home page Giter Site logo

tutorial-first-application's People

Contributors

1ma avatar akrabat avatar geggleto avatar itangsanjana avatar llvdl avatar lornajane avatar russellsnyder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tutorial-first-application's Issues

Migration Database

@lornajane can you or anyone who did the migration right just put the .sql here?

Guess is more simple and fast to make things up.

thanks.

Phinx Migration

On Windows 7 professional the command php vendor/bin/phinx migrate doesn't work, try it without php will run the migration successfully.

Modify the steps in README.md for clarity

Here is what I found as a noob

Run php composer.phar install

Composer could not find a composer.json file in Tutorial-First-Application
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section

Fix by change the shell working directory to src

Run php vendor/bin/phinx migrate

[InvalidArgumentException]
There was a problem connecting to the database: SQLSTATE[HY000] [1045] Access denied for user 'user'@'localhost' (using password: YES)

Fix by creating the database to use first

Visit url /tickets

Slim Application Error
The application could not run because of the following error:
Details
Type: PDOException
Code: 1045
Message: SQLSTATE[HY000] [1045] Access denied for user 'user'@'localhost' (using password: YES)
File: Tutorial-First-Application/src/public/index.php
Line: 32

Fix by adjusting $config['db'] array in public/index.php as well

Tickets page not working as expected

After installing the project in a sub directory the tickets page it did not work. It was not possible to add new items, the URL to add new items is wrong. When I changed it manually it worked. To solve it “easy way” I used a virtual site, but that is workable on the long run.

After some testing I removed the virtual site, but this time I was able to view the details without any problems. Then I note that view detail uses pathFor, but that is not done for Add new ticket. The URL for new tickets is hard coded.
From tickets.phtml
Line 9
<p><a href="/ticket/new">Add new ticket</a></p>
line 31
<a href="<?=$router->pathFor('ticket-detail', ['id' => $ticket->getId()])?>">view</a>

Is this done on purpose?

I solved it this way:
file index.php line 72 change

});

to

})->setName('ticket-new');

file tickets.phtml line 9 change

<p><a href="/ticket/new">Add new ticket</a></p>

to

<p><a href="<?=$router->pathFor('ticket-new')?>">Add new ticket</a></p>

Is this the way to go, or should it be done in an other way?

Not redirecting tickets page by default

When ever a user redirects to default URL then it shows Page Not Found.
I wasted so much time to figure it out what is the issue with the application.
At last, I found out that the problem with the routes. So I feel it's better to redirect to tickets page.

Please let me if you want to implement this. I will create a merge request for this.
Thanks :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.