Best laravel framework open-source packages.

Talk And Play Marketplace

A Web application for crowdsourcing content for the Talk And Play app.
Updated 4 months ago

Talk & Play Marketplace Web Application

GitHub Issues GitHub Stars GitHub forks JavaScript Style Guide: Good Parts contributions welcome License Maintenance Ask Me Anything !

Laravel 10 Web Application for Creating content for the Talk & Play application

Project URL

Installation Instructions:

First time install (setup database and install dependencies)

  1. Make sure PHP 8.1 (or newer) is installed.

  2. After cloning the project, create an .env file (should be a copy of .env.example), containing the information about your database name and credentials. Then run php artisan migrate to create the DB schema and php artisan db:seed in order to insert the starter data to the DB

  3. Install laravel/back-end dependencies

composer install
  1. Front-end dependencies

It is very easy to install multiple versions of NodeJS and npm, by using Node Version Manager (nvm).

If you are using nvm, run this command in order to sync to the correct NodeJS version for the project:

nvm use

Then, install and compile the front-end dependencies:

npm install

npm run dev
  1. Create the symbolic link for user-uploaded files.
php artisan storage:link

in order to link the /public/storage folder with the /storage/app/public directory.

Crontab configuration (for production/staging server)

# For more information see the manual pages of crontab(5) and cron(8)
# 
# m h  dom mon dow   command
* * * * * cd /home/project_talkandplay/www/talkandplay.scify.org/ && php artisan schedule:run >> /dev/null 2>&1

SEO - Generate Sitemap

This application uses Spatie - Laravel Sitemap plugin, in order to create the public/sitemap.xml file (which is excluded from git), that will be crawled by the search engines. In order to run the generator for the current application installation, run the embedded Laravel command:

PHP code style - Laravel Pint

This application uses Laravel Pint in order to perform code-style.

In order to run the styler, run :

./vendor/bin/pint --test -v # the --test will not do any changes, it will just output the changes needed

./vendor/bin/pint -v # this command will actually perform the code style changes 

Apache configuration example:

% sudo touch /etc/apache2/sites-available/tnpmarketplace.conf
% sudo nano /etc/apache2/sites-available/tnpmarketplace.conf
<VirtualHost *:80>
       
        ServerName dev.tnpmarketplace
        ServerAlias dev.tnpmarketplace
        DocumentRoot "/home/path/to/project/public"
        <Directory "/home/path/to/project/public">
            Require all granted
            AllowOverride all
        </Directory>
       
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

Make the symbolic link:

% cd /etc/apache2/sites-enabled && sudo ln -s ../sites-available/tnpmarketplace.conf

Enable mod_rewrite, mod_ssl and restart apache:

% sudo a2enmod rewrite && sudo a2enmod ssl && sudo service apache2 restart

Fix permissions for storage directory:

sudo chown -R user:www-data storage
chmod 775 storage
cd storage/
find . -type f -exec chmod 664 {} \;
find . -type d -exec chmod 775 {} \;

Or run the set-file-permissions.sh script.

Change hosts file so dev.tnpmarketplace points to to localhost

sudo nano /etc/hosts
127.0.0.1   dev.tnpmarketplace

How to debug

  • Install and configure Xdebug on your machine
  • At Chrome install Xdebug helper
  • At PhpStorm/IntelliJ click the "Start listening for PHP debug connections"
Tags mysql