mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-06-08 03:18:59 +00:00
Merge branch 'develop' into pdf-templates-logo
This commit is contained in:
175
.dev/README.md
Normal file
175
.dev/README.md
Normal file
@@ -0,0 +1,175 @@
|
||||
# InvoiceShelf Development Environment
|
||||
|
||||
This is dockerized development environment that allows developers to easily get started to develop InvoiceShelf.
|
||||
|
||||
This development environment is **NOT MEANT TO BE USED IN PRODUCTION** and is preconfigured with all the needed tools that InvoiceShelf requires for development purposes. It works on Windows, Linux and MacOS.
|
||||
|
||||
For production grade docker image, please refer to [InvoiceShelf/docker](https://github.com/InvoiceShelf/docker) and [InvoiceShelf on DockerHub](https://hub.docker.com/r/invoiceshelf/invoiceshelf).
|
||||
|
||||
## How to set up
|
||||
|
||||
### 1. Hosts configuration
|
||||
|
||||
We use `invoiceshelf.test` domain for local development within this environment and you need to adhere to it.
|
||||
|
||||
For that purpose you need to edit your OS hosts file or DNS server and add the following line to make the local domain name available on your system.
|
||||
|
||||
```
|
||||
127.0.0.1 invoiceshelf.test
|
||||
```
|
||||
|
||||
#### 1.1. Windows
|
||||
|
||||
The hosts file on Windows is located at `C:\Windows\system32\drivers\etc\hosts`.
|
||||
|
||||
You need to launch Notepad as administrator, open the file through **File > Open**, add the line from above and save the file.
|
||||
|
||||
#### 1.2. Linux/MacOS
|
||||
|
||||
The hosts file on Linux and Mac is located at `/etc/hosts`.
|
||||
|
||||
You need to open the file using your favorite editor as sudo/root, add the line from above and save the file.
|
||||
|
||||
### 2. FileSystem configuration (Linux)
|
||||
|
||||
If you are using **Linux**, you need to make sure that **USRID** and **GRPID** environment variables are set and matching your current session user ids. Those two variables are required to set up the filesystem permissions correctly on Linux.
|
||||
|
||||
You can run it one time, every time before starting as follows:
|
||||
|
||||
```
|
||||
export USRID=$(id -u) && export GRPID=$(id -g)
|
||||
```
|
||||
|
||||
or you can append this to your .zshrc/.bashrc by running this command in your terminal:
|
||||
|
||||
```
|
||||
grep -qxF 'export USRID=$(id -u) GRPID=$(id -g)' ~/.${SHELL##*/}rc || echo 'export USRID=$(id -u) GRPID=$(id -g)' >> ~/.${SHELL##*/}rc
|
||||
```
|
||||
this will append the `export` line to your rc file and run it on each terminal session.
|
||||
|
||||
### 3. Clone the project
|
||||
|
||||
Clone the InvoiceShelf project directly from InvoiceShelf git or your forked repository:
|
||||
|
||||
```bash
|
||||
git clone git@github.com:InvoiceShelf/InvoiceShelf.git
|
||||
```
|
||||
|
||||
## Development Workflow
|
||||
|
||||
We bundled separate docker-compose.yml file for each database: MySQL, PostgresSQL and SQLite, you can use any of those to spin up your development environment.
|
||||
|
||||
| Database | Compose File |
|
||||
|---------|---------------------------|
|
||||
| SQLite3 | docker-compose.sqlite.yml |
|
||||
| MariaDB | docker-compose.mysql.yml |
|
||||
| PostgresSQL | dpcler-compose.pgsql.yml |
|
||||
|
||||
### 1. Spinning Up
|
||||
|
||||
To **spin up** the environment, run docker compose as follows:
|
||||
|
||||
**Important**: If you are on **Linux** and didn't add the `export` line to your .zshrc/.bashrc file, you need to repeat `step 2` before spinning up, otherwise you will face permissions issues.
|
||||
|
||||
```
|
||||
docker compose -f .dev/docker-compose.mysql.yml up --build
|
||||
```
|
||||
|
||||
### 2. Spinning Down
|
||||
|
||||
To **spin down** the environment, run docker compose as follows:
|
||||
|
||||
```
|
||||
docker compose -f .dev/docker-compose.mysql.yml down
|
||||
```
|
||||
|
||||
### 3. Working with binaries
|
||||
|
||||
To correctly run `composer`, `npm`, `artisan`, `pint`, `pest` or other binaries within this project, you must ssh into the container as follows:
|
||||
|
||||
```
|
||||
docker exec -it --user invoiceshelf invoiceshelf-dev-php /bin/bash
|
||||
```
|
||||
|
||||
In the `/home/invoiceshelf/app` directory you can find the application root and run the commands from there.
|
||||
|
||||
## What is included
|
||||
|
||||
### 1. Web Server
|
||||
|
||||
This dockerized environment uses PHP-FPM and NGINX together to serve the website `invoiceshelf.test`
|
||||
|
||||
Both NGINX and PHP-FPM are configured with optimal settings for development. Please don't use this in production.
|
||||
|
||||
**URL**: http://invoiceshelf.test/
|
||||
|
||||
### 2. Databases
|
||||
|
||||
This dockerized environment comes with support for all three databases that InvoiceShelf suppots: MySQL, PostgreSQL and SQLite.
|
||||
|
||||
The setup parameters/credentials for each of the supported databases are as follows.
|
||||
|
||||
| | MySQL | PostgreSQL | SQLite |
|
||||
|---|---|---|---|
|
||||
| **DB_USER** | invoiceshelf | invoiceshelf | Not applicable |
|
||||
| **DB_PASS** | invoiceshelf | invoiceshelf | Not applicable |
|
||||
| **DB_NAME** | invoiceshelf | invoiceshelf | /home/invoiceshelf/database/database.sqlite |
|
||||
| **DB_HOST** | db-mysql | db-pgsql | Not applicable |
|
||||
| **DB_PORT** | 3036 | 5432 | Not applicable |
|
||||
|
||||
**Note:** The only required field for SQLite is **DB_NAME**.
|
||||
|
||||
### 3. Adminer
|
||||
|
||||
Adminer is UI tool for viewing the database contents and executing queries.
|
||||
|
||||
It supports MySQL, PostgreSQL, SQLite.
|
||||
|
||||
**URL**: http://invoiceshelf.test:8080
|
||||
|
||||
#### MySQL/PostgresSQL
|
||||
|
||||
To log into the MySQL or PostgresSQL, use the database information specified in the above section (2. Databases)
|
||||
|
||||
#### SQLite
|
||||
|
||||
To log into the SQLite, use the following credentials:
|
||||
|
||||
| KEY | VALUE |
|
||||
|--------------|---------------------------|
|
||||
| **USERNAME** | admin |
|
||||
| **PASSWORD** | admin |
|
||||
| **DATABASE** | /database/database.sqlite |
|
||||
|
||||
|
||||
### 4. Mailpit (fake mail)
|
||||
|
||||
To utilize Mailpit, use the following credentials:
|
||||
|
||||
| KEY | VALUE |
|
||||
|---------------------|-------------|
|
||||
| **MAIL DRIVER** | smtp |
|
||||
| **MAIL HOST** | mail |
|
||||
| **MAIL PORT** | 1025 |
|
||||
| **MAIL ENCRYPTION** | none |
|
||||
| **MAIL USER** | leave empty |
|
||||
| **MAIL PASS** | leave empty |
|
||||
| **FROM MAIL ADDR** | your choice |
|
||||
| **FROM MAIL NAME** | your choice |
|
||||
|
||||
|
||||
**URL**: http://invoiceshelf.test:8025
|
||||
|
||||
---
|
||||
|
||||
If you have any questions, feel free to open issue.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
14
.dev/adminer/Dockerfile
Normal file
14
.dev/adminer/Dockerfile
Normal file
@@ -0,0 +1,14 @@
|
||||
FROM adminer:latest
|
||||
|
||||
USER root
|
||||
|
||||
RUN set -x && \
|
||||
apt update && \
|
||||
apt install curl -y && \
|
||||
cd /var/www/html/plugins-enabled && \
|
||||
curl -O https://gist.githubusercontent.com/gdarko/00af6e9a754f09c3f81cd3c606c33311/raw/d5f6a30f00edecf30a5d380340d9dae79a3b7352/login-password-less.php
|
||||
|
||||
USER adminer
|
||||
CMD [ "php", "-S", "[::]:8080", "-t", "/var/www/html" ]
|
||||
|
||||
EXPOSE 8080
|
||||
70
.dev/docker-compose.mysql.yml
Normal file
70
.dev/docker-compose.mysql.yml
Normal file
@@ -0,0 +1,70 @@
|
||||
services:
|
||||
php-fpm:
|
||||
container_name: invoiceshelf-dev-php
|
||||
build:
|
||||
context: ./php
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
- UID=${USRID:-1000}
|
||||
- GID=${GRPID:-1000}
|
||||
ports:
|
||||
- 5173:5173
|
||||
volumes:
|
||||
- ../:/home/invoiceshelf/app
|
||||
networks:
|
||||
- invoiceshelf-dev
|
||||
|
||||
nginx:
|
||||
container_name: invoiceshelf-dev-nginx
|
||||
image: nginx:stable
|
||||
ports:
|
||||
- '80:80'
|
||||
volumes:
|
||||
- ./nginx/conf.d/dev.conf:/etc/nginx/conf.d/dev.conf
|
||||
- ../:/home/invoiceshelf/app
|
||||
networks:
|
||||
- invoiceshelf-dev
|
||||
|
||||
db:
|
||||
image: mariadb:10.9
|
||||
container_name: invoiceshelf-dev-mysql
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: invoiceshelf
|
||||
MYSQL_DATABASE: invoiceshelf
|
||||
MYSQL_USER: invoiceshelf
|
||||
MYSQL_PASSWORD: invoiceshelf
|
||||
ports:
|
||||
- "3306:3306"
|
||||
volumes:
|
||||
- invoiceshelf-dev-mysql:/var/lib/mysql
|
||||
networks:
|
||||
- invoiceshelf-dev
|
||||
|
||||
adminer:
|
||||
container_name: invoiceshelf-dev-adminer
|
||||
build:
|
||||
context: ./adminer
|
||||
dockerfile: Dockerfile
|
||||
environment:
|
||||
ADMINER_PLUGINS: tables-filter
|
||||
ADMINER_DESIGN: konya
|
||||
ports:
|
||||
- '8080:8080'
|
||||
networks:
|
||||
- invoiceshelf-dev
|
||||
|
||||
mail:
|
||||
container_name: invoiceshelf-dev-mailpit
|
||||
image: axllent/mailpit:latest
|
||||
restart: always
|
||||
ports:
|
||||
- 1025:1025
|
||||
- 8025:8025
|
||||
networks:
|
||||
- invoiceshelf-dev
|
||||
|
||||
networks:
|
||||
invoiceshelf-dev:
|
||||
|
||||
volumes:
|
||||
invoiceshelf-dev-mysql:
|
||||
69
.dev/docker-compose.pgsql.yml
Normal file
69
.dev/docker-compose.pgsql.yml
Normal file
@@ -0,0 +1,69 @@
|
||||
services:
|
||||
php-fpm:
|
||||
container_name: invoiceshelf-dev-php
|
||||
build:
|
||||
context: ./php
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
- UID=${USRID:-1000}
|
||||
- GID=${GRPID:-1000}
|
||||
ports:
|
||||
- 5173:5173
|
||||
volumes:
|
||||
- ../:/home/invoiceshelf/app
|
||||
networks:
|
||||
- invoiceshelf-dev
|
||||
|
||||
nginx:
|
||||
container_name: invoiceshelf-dev-nginx
|
||||
image: nginx:stable
|
||||
ports:
|
||||
- '80:80'
|
||||
volumes:
|
||||
- ./nginx/conf.d/dev.conf:/etc/nginx/conf.d/dev.conf
|
||||
- ../:/home/invoiceshelf/app
|
||||
networks:
|
||||
- invoiceshelf-dev
|
||||
|
||||
db:
|
||||
image: postgres:15
|
||||
container_name: invoiceshelf-dev-pgsql
|
||||
environment:
|
||||
- POSTGRES_PASSWORD=invoiceshelf
|
||||
- POSTGRES_USER=invoiceshelf
|
||||
- POSTGRES_DB=invoiceshelf
|
||||
ports:
|
||||
- 5432:5432
|
||||
volumes:
|
||||
- invoiceshelf-dev-pgsql:/var/lib/postgresql/data
|
||||
networks:
|
||||
- invoiceshelf-dev
|
||||
|
||||
adminer:
|
||||
container_name: invoiceshelf-dev-adminer
|
||||
build:
|
||||
context: ./adminer
|
||||
dockerfile: Dockerfile
|
||||
environment:
|
||||
ADMINER_PLUGINS: tables-filter
|
||||
ADMINER_DESIGN: konya
|
||||
ports:
|
||||
- '8080:8080'
|
||||
networks:
|
||||
- invoiceshelf-dev
|
||||
|
||||
mail:
|
||||
container_name: invoiceshelf-dev-mailpit
|
||||
image: axllent/mailpit:latest
|
||||
restart: always
|
||||
ports:
|
||||
- 1025:1025
|
||||
- 8025:8025
|
||||
networks:
|
||||
- invoiceshelf-dev
|
||||
|
||||
networks:
|
||||
invoiceshelf-dev:
|
||||
|
||||
volumes:
|
||||
invoiceshelf-dev-pgsql:
|
||||
54
.dev/docker-compose.sqlite.yml
Normal file
54
.dev/docker-compose.sqlite.yml
Normal file
@@ -0,0 +1,54 @@
|
||||
services:
|
||||
php-fpm:
|
||||
container_name: invoiceshelf-dev-php
|
||||
build:
|
||||
context: ./php
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
- UID=${USRID:-1000}
|
||||
- GID=${GRPID:-1000}
|
||||
volumes:
|
||||
- ../:/home/invoiceshelf/app
|
||||
ports:
|
||||
- 5173:5173
|
||||
networks:
|
||||
- invoiceshelf-dev
|
||||
|
||||
nginx:
|
||||
container_name: invoiceshelf-dev-nginx
|
||||
image: nginx:stable
|
||||
ports:
|
||||
- '80:80'
|
||||
volumes:
|
||||
- ./nginx/conf.d/dev.conf:/etc/nginx/conf.d/dev.conf
|
||||
- ../:/home/invoiceshelf/app
|
||||
networks:
|
||||
- invoiceshelf-dev
|
||||
|
||||
adminer:
|
||||
container_name: invoiceshelf-dev-adminer
|
||||
build:
|
||||
context: ./adminer
|
||||
dockerfile: Dockerfile
|
||||
environment:
|
||||
ADMINER_PLUGINS: tables-filter
|
||||
ADMINER_DESIGN: konya
|
||||
volumes:
|
||||
- ../database:/database
|
||||
ports:
|
||||
- '8080:8080'
|
||||
networks:
|
||||
- invoiceshelf-dev
|
||||
|
||||
mail:
|
||||
container_name: invoiceshelf-dev-mailpit
|
||||
image: axllent/mailpit:latest
|
||||
restart: always
|
||||
ports:
|
||||
- 1025:1025
|
||||
- 8025:8025
|
||||
networks:
|
||||
- invoiceshelf-dev
|
||||
|
||||
networks:
|
||||
invoiceshelf-dev:
|
||||
22
.dev/nginx/conf.d/dev.conf
Normal file
22
.dev/nginx/conf.d/dev.conf
Normal file
@@ -0,0 +1,22 @@
|
||||
server {
|
||||
listen 80;
|
||||
|
||||
root /home/invoiceshelf/app/public;
|
||||
index index.php;
|
||||
|
||||
error_log /var/log/nginx/dev-error.log;
|
||||
access_log /var/log/nginx/dev-access.log;
|
||||
|
||||
server_name invoiceshelf.test;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass php-fpm:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
}
|
||||
}
|
||||
64
.dev/php/Dockerfile
Normal file
64
.dev/php/Dockerfile
Normal file
@@ -0,0 +1,64 @@
|
||||
FROM php:8.3-fpm-bookworm
|
||||
|
||||
ARG UID
|
||||
ARG GID
|
||||
|
||||
ENV UID=${UID}
|
||||
ENV GID=${GID}
|
||||
|
||||
USER root
|
||||
|
||||
# Create user/group
|
||||
RUN addgroup --gid ${GID} --system invoiceshelf && \
|
||||
adduser --gid ${GID} --system --disabled-password --shell /bin/sh -u ${UID} --home /home/invoiceshelf invoiceshelf && \
|
||||
sed -i "s/user = www-data/user = invoiceshelf/g" /usr/local/etc/php-fpm.d/www.conf && \
|
||||
sed -i "s/group = www-data/group = invoiceshelf/g" /usr/local/etc/php-fpm.d/www.conf
|
||||
|
||||
# Install composer & npm
|
||||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \
|
||||
curl -sL https://deb.nodesource.com/setup_20.x | bash - && \
|
||||
apt install -y nodejs
|
||||
|
||||
# install dependencies
|
||||
RUN apt update && apt install -y \
|
||||
libpng-dev \
|
||||
zlib1g-dev \
|
||||
libxml2-dev \
|
||||
libzip-dev \
|
||||
libonig-dev \
|
||||
libpq-dev \
|
||||
sqlite3 \
|
||||
postgresql-client \
|
||||
mariadb-client \
|
||||
zip \
|
||||
curl \
|
||||
unzip \
|
||||
webp \
|
||||
&& docker-php-ext-configure gd \
|
||||
&& docker-php-ext-install -j$(nproc) gd \
|
||||
&& docker-php-ext-install bcmath \
|
||||
&& docker-php-ext-install mbstring \
|
||||
&& docker-php-ext-install mysqli \
|
||||
&& docker-php-ext-install pdo_mysql \
|
||||
&& docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql \
|
||||
&& docker-php-ext-install pgsql \
|
||||
&& docker-php-ext-install pdo_pgsql \
|
||||
&& docker-php-ext-install zip \
|
||||
&& docker-php-ext-install xml \
|
||||
&& docker-php-ext-install exif \
|
||||
&& docker-php-source delete
|
||||
|
||||
# Clear cache
|
||||
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Set workdir
|
||||
WORKDIR /home/invoiceshelf/app
|
||||
|
||||
# Copy Files
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
|
||||
# Entrypoint
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
# Launch php-fpm
|
||||
CMD ["php-fpm"]
|
||||
44
.dev/php/entrypoint.sh
Executable file
44
.dev/php/entrypoint.sh
Executable file
@@ -0,0 +1,44 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "############################################"
|
||||
echo "### InvoiceShelf Development Environment ###"
|
||||
echo "############################################"
|
||||
|
||||
cd /home/invoiceshelf/app
|
||||
|
||||
|
||||
# Composer build
|
||||
if [ ! -d vendor ]; then
|
||||
composer install
|
||||
fi
|
||||
|
||||
# Empty sqlite database
|
||||
if [ ! -f database/database.sqlite ]; then
|
||||
cp database/stubs/sqlite.empty.db database/database.sqlite
|
||||
fi
|
||||
|
||||
# .env file set up
|
||||
if [ ! -f .env ]; then
|
||||
cp .env.example .env
|
||||
php artisan key:generate --force
|
||||
fi
|
||||
|
||||
# NPM build
|
||||
if [ ! -d node_modules ]; then
|
||||
npm install
|
||||
npm run build
|
||||
fi
|
||||
|
||||
# Storage symlink
|
||||
php artisan storage:link
|
||||
|
||||
# Permissions
|
||||
chmod 775 storage/framework
|
||||
chmod 775 storage/logs
|
||||
chmod 775 bootstrap/cache
|
||||
chown -R ${UID}:${GID} /home/invoiceshelf/app
|
||||
chmod +x artisan
|
||||
|
||||
echo "Entrypoint complete."
|
||||
|
||||
exec $@
|
||||
1974
.dev/php/php.ini
Normal file
1974
.dev/php/php.ini
Normal file
File diff suppressed because it is too large
Load Diff
25
.env.example
25
.env.example
@@ -1,9 +1,20 @@
|
||||
APP_ENV=production
|
||||
APP_KEY=base64:kgk/4DW1vEVy7aEvet5FPp5un6PIGe/so8H0mvoUtW0=
|
||||
APP_DEBUG=true
|
||||
APP_NAME="InvoiceShelf"
|
||||
APP_LOG_LEVEL=debug
|
||||
APP_TIMEZONE=UTC
|
||||
APP_URL=http://invoiceshelf.test
|
||||
|
||||
APP_LOCALE=en
|
||||
APP_FALLBACK_LOCALE=en
|
||||
APP_FAKER_LOCALE=en_US
|
||||
|
||||
APP_MAINTENANCE_DRIVER=file
|
||||
APP_MAINTENANCE_STORE=database
|
||||
|
||||
BCRYPT_ROUNDS=12
|
||||
|
||||
DB_CONNECTION=sqlite
|
||||
DB_HOST=
|
||||
DB_PORT=
|
||||
@@ -11,11 +22,14 @@ DB_DATABASE=
|
||||
DB_USERNAME=
|
||||
DB_PASSWORD=
|
||||
|
||||
BROADCAST_DRIVER=log
|
||||
CACHE_DRIVER=file
|
||||
QUEUE_DRIVER=sync
|
||||
SESSION_DRIVER=cookie
|
||||
BROADCAST_CONNECTION=log
|
||||
CACHE_STORE=file
|
||||
QUEUE_CONNECTION=sync
|
||||
SESSION_DRIVER=file
|
||||
SESSION_LIFETIME=1440
|
||||
SESSION_ENCRYPT=false
|
||||
SESSION_PATH=/
|
||||
SESSION_DOMAIN=null
|
||||
|
||||
REDIS_HOST=127.0.0.1
|
||||
REDIS_PASSWORD=null
|
||||
@@ -36,8 +50,7 @@ PUSHER_KEY=
|
||||
PUSHER_SECRET=
|
||||
|
||||
SANCTUM_STATEFUL_DOMAINS=invoiceshelf.test
|
||||
SESSION_DOMAIN=invoiceshelf.test
|
||||
|
||||
TRUSTED_PROXIES="*"
|
||||
|
||||
CRON_JOB_AUTH_TOKEN=""
|
||||
LOG_STACK=single
|
||||
|
||||
24
.gitattributes
vendored
24
.gitattributes
vendored
@@ -1,3 +1,25 @@
|
||||
* text=auto
|
||||
# Set the default behavior, in case people don't have core.autocrlf set.
|
||||
* text eol=lf
|
||||
|
||||
# Explicitly declare text files you want to always be normalized and converted
|
||||
# to native line endings on checkout.
|
||||
*.c text
|
||||
*.h text
|
||||
|
||||
# Declare files that will always have CRLF line endings on checkout.
|
||||
*.sln text eol=crlf
|
||||
|
||||
# Denote all files that are truly binary and should not be modified.
|
||||
*.png binary
|
||||
*.jpg binary
|
||||
*.gif binary
|
||||
*.otf binary
|
||||
*.eot binary
|
||||
*.svg binary
|
||||
*.ttf binary
|
||||
*.woff binary
|
||||
*.woff2 binary
|
||||
|
||||
*.css linguist-vendored
|
||||
*.scss linguist-vendored
|
||||
*.js linguist-vendored
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -22,3 +22,5 @@ Homestead.yaml
|
||||
.php-cs-fixer.cache
|
||||
/storage/fonts*
|
||||
package-lock.json
|
||||
/.dev/docker-compose.yml
|
||||
/.dev/docker-compose.yaml
|
||||
|
||||
3
Makefile
3
Makefile
@@ -29,14 +29,15 @@ dist-gen: clean composer npm-build
|
||||
@cp -r routes InvoiceShelf
|
||||
@cp -r storage InvoiceShelf
|
||||
@cp -r vendor InvoiceShelf 2> /dev/null || true
|
||||
@cp -r version.md InvoiceShelf
|
||||
@cp -r .env.example InvoiceShelf
|
||||
@cp -r artisan InvoiceShelf
|
||||
@cp -r composer.json InvoiceShelf
|
||||
@cp -r composer.lock InvoiceShelf
|
||||
@cp -r server.php InvoiceShelf
|
||||
@cp -r LICENSE InvoiceShelf
|
||||
@cp -r readme.md InvoiceShelf
|
||||
@cp -r SECURITY.md InvoiceShelf
|
||||
@cp -r server.php InvoiceShelf
|
||||
@touch InvoiceShelf/storage/logs/laravel.log
|
||||
|
||||
dist-clean: dist-gen
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Bouncer\Scopes;
|
||||
namespace App\Bouncer\Scopes;
|
||||
|
||||
use Silber\Bouncer\Database\Scope\Scope;
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Console\Commands;
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Models\Estimate;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Console\Command;
|
||||
use InvoiceShelf\Models\Estimate;
|
||||
|
||||
class CheckEstimateStatus extends Command
|
||||
{
|
||||
@@ -37,7 +37,7 @@ class CheckEstimateStatus extends Command
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle()
|
||||
public function handle(): void
|
||||
{
|
||||
$date = Carbon::now();
|
||||
$status = [Estimate::STATUS_ACCEPTED, Estimate::STATUS_REJECTED, Estimate::STATUS_EXPIRED];
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Console\Commands;
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Models\Invoice;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Console\Command;
|
||||
use InvoiceShelf\Models\Invoice;
|
||||
|
||||
class CheckInvoiceStatus extends Command
|
||||
{
|
||||
@@ -37,7 +37,7 @@ class CheckInvoiceStatus extends Command
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle()
|
||||
public function handle(): void
|
||||
{
|
||||
$date = Carbon::now();
|
||||
$invoices = Invoice::whereNotIn('status', [Invoice::STATUS_COMPLETED, Invoice::STATUS_DRAFT])
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Console\Commands;
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
@@ -33,10 +33,8 @@ class CreateTemplateCommand extends Command
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function handle()
|
||||
public function handle(): int
|
||||
{
|
||||
$templateName = $this->argument('name');
|
||||
$type = $this->option('type');
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Console\Commands;
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Space\ModuleInstaller;
|
||||
use Illuminate\Console\Command;
|
||||
use InvoiceShelf\Space\ModuleInstaller;
|
||||
|
||||
class InstallModuleCommand extends Command
|
||||
{
|
||||
@@ -33,10 +33,8 @@ class InstallModuleCommand extends Command
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function handle()
|
||||
public function handle(): int
|
||||
{
|
||||
ModuleInstaller::complete($this->argument('module'), $this->argument('version'));
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Console\Commands;
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Console\ConfirmableTrait;
|
||||
@@ -39,7 +39,7 @@ class ResetApp extends Command
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle()
|
||||
public function handle(): void
|
||||
{
|
||||
if (! $this->confirmToProceed()) {
|
||||
return;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Console\Commands;
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Models\Setting;
|
||||
use App\Space\Updater;
|
||||
use Illuminate\Console\Command;
|
||||
use InvoiceShelf\Models\Setting;
|
||||
use InvoiceShelf\Space\Updater;
|
||||
|
||||
// Implementation taken from Akaunting - https://github.com/akaunting/akaunting
|
||||
class UpdateCommand extends Command
|
||||
@@ -42,7 +42,7 @@ class UpdateCommand extends Command
|
||||
/**
|
||||
* Execute the console command.
|
||||
*/
|
||||
public function handle()
|
||||
public function handle(): void
|
||||
{
|
||||
set_time_limit(3600); // 1 hour
|
||||
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Console;
|
||||
|
||||
use Illuminate\Console\Scheduling\Schedule;
|
||||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
||||
use InvoiceShelf\Models\CompanySetting;
|
||||
use InvoiceShelf\Models\RecurringInvoice;
|
||||
use InvoiceShelf\Space\InstallUtils;
|
||||
|
||||
class Kernel extends ConsoleKernel
|
||||
{
|
||||
/**
|
||||
* The Artisan commands provided by your application.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $commands = [
|
||||
Commands\ResetApp::class,
|
||||
Commands\UpdateCommand::class,
|
||||
Commands\CreateTemplateCommand::class,
|
||||
Commands\InstallModuleCommand::class,
|
||||
];
|
||||
|
||||
/**
|
||||
* Define the application's command schedule.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function schedule(Schedule $schedule)
|
||||
{
|
||||
if (InstallUtils::isDbCreated()) {
|
||||
$schedule->command('check:invoices:status')
|
||||
->daily();
|
||||
|
||||
$schedule->command('check:estimates:status')
|
||||
->daily();
|
||||
|
||||
$recurringInvoices = RecurringInvoice::where('status', 'ACTIVE')->get();
|
||||
foreach ($recurringInvoices as $recurringInvoice) {
|
||||
$timeZone = CompanySetting::getSetting('time_zone', $recurringInvoice->company_id);
|
||||
|
||||
$schedule->call(function () use ($recurringInvoice) {
|
||||
$recurringInvoice->generateInvoice();
|
||||
})->cron($recurringInvoice->frequency)->timezone($timeZone);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the Closure based commands for the application.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function commands()
|
||||
{
|
||||
$this->load(__DIR__.'/Commands');
|
||||
require base_path('routes/console.php');
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Events;
|
||||
namespace App\Events;
|
||||
|
||||
use Illuminate\Broadcasting\InteractsWithSockets;
|
||||
use Illuminate\Foundation\Events\Dispatchable;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Events;
|
||||
namespace App\Events;
|
||||
|
||||
use Illuminate\Broadcasting\InteractsWithSockets;
|
||||
use Illuminate\Foundation\Events\Dispatchable;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Events;
|
||||
namespace App\Events;
|
||||
|
||||
use Illuminate\Broadcasting\InteractsWithSockets;
|
||||
use Illuminate\Foundation\Events\Dispatchable;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Events;
|
||||
namespace App\Events;
|
||||
|
||||
use Illuminate\Foundation\Events\Dispatchable;
|
||||
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Exceptions;
|
||||
|
||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||
use Throwable;
|
||||
|
||||
class Handler extends ExceptionHandler
|
||||
{
|
||||
/**
|
||||
* A list of the exception types that are not reported.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $dontReport = [
|
||||
//
|
||||
];
|
||||
|
||||
/**
|
||||
* A list of the inputs that are never flashed for validation exceptions.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $dontFlash = [
|
||||
'password',
|
||||
'password_confirmation',
|
||||
];
|
||||
|
||||
/**
|
||||
* Report or log an exception.
|
||||
*
|
||||
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function report(Throwable $exception)
|
||||
{
|
||||
parent::report($exception);
|
||||
}
|
||||
|
||||
/**
|
||||
* Render an exception into an HTTP response.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function render($request, Throwable $exception)
|
||||
{
|
||||
return parent::render($request, $exception);
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Generators;
|
||||
namespace App\Generators;
|
||||
|
||||
use InvoiceShelf\Models\Estimate;
|
||||
use InvoiceShelf\Models\Invoice;
|
||||
use InvoiceShelf\Models\Payment;
|
||||
use App\Models\Estimate;
|
||||
use App\Models\Invoice;
|
||||
use App\Models\Payment;
|
||||
use Spatie\MediaLibrary\MediaCollections\Models\Media;
|
||||
use Spatie\MediaLibrary\Support\PathGenerator\PathGenerator;
|
||||
|
||||
|
||||
@@ -1,23 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers;
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Setting;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Models\Setting;
|
||||
|
||||
class AppVersionController extends Controller
|
||||
{
|
||||
/**
|
||||
* Handle the incoming request.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function __invoke(Request $request)
|
||||
{
|
||||
$version = Setting::getSetting('version');
|
||||
|
||||
$channel = Setting::getSetting('updater_channel');
|
||||
if (is_null($channel)) {
|
||||
$channel = 'stable';
|
||||
Setting::setSetting('updater_channel', 'stable'); // default.
|
||||
}
|
||||
|
||||
return response()->json([
|
||||
'version' => $version,
|
||||
'channel' => $channel,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers;
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
|
||||
use Illuminate\Foundation\Bus\DispatchesJobs;
|
||||
use Illuminate\Foundation\Validation\ValidatesRequests;
|
||||
use Illuminate\Routing\Controller as BaseController;
|
||||
|
||||
class Controller extends BaseController
|
||||
abstract class Controller extends BaseController
|
||||
{
|
||||
use AuthorizesRequests;
|
||||
use DispatchesJobs;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Auth;
|
||||
namespace App\Http\Controllers\V1\Admin\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Providers\AppServiceProvider;
|
||||
use Illuminate\Foundation\Auth\ConfirmsPasswords;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Providers\RouteServiceProvider;
|
||||
|
||||
class ConfirmPasswordController extends Controller
|
||||
{
|
||||
@@ -26,7 +26,7 @@ class ConfirmPasswordController extends Controller
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = RouteServiceProvider::HOME;
|
||||
protected $redirectTo = AppServiceProvider::HOME;
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Auth;
|
||||
namespace App\Http\Controllers\V1\Admin\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
|
||||
class ForgotPasswordController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Auth;
|
||||
namespace App\Http\Controllers\V1\Admin\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Providers\AppServiceProvider;
|
||||
use Illuminate\Foundation\Auth\AuthenticatesUsers;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Providers\RouteServiceProvider;
|
||||
|
||||
class LoginController extends Controller
|
||||
{
|
||||
@@ -26,7 +26,7 @@ class LoginController extends Controller
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = RouteServiceProvider::HOME;
|
||||
protected $redirectTo = AppServiceProvider::HOME;
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Auth;
|
||||
namespace App\Http\Controllers\V1\Admin\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\User;
|
||||
use App\Providers\AppServiceProvider;
|
||||
use Illuminate\Foundation\Auth\RegistersUsers;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Models\User;
|
||||
use InvoiceShelf\Providers\RouteServiceProvider;
|
||||
|
||||
class RegisterController extends Controller
|
||||
{
|
||||
@@ -28,7 +28,7 @@ class RegisterController extends Controller
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = RouteServiceProvider::HOME;
|
||||
protected $redirectTo = AppServiceProvider::HOME;
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Auth;
|
||||
namespace App\Http\Controllers\V1\Admin\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Providers\AppServiceProvider;
|
||||
use Illuminate\Auth\Events\PasswordReset;
|
||||
use Illuminate\Foundation\Auth\ResetsPasswords;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Str;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Providers\RouteServiceProvider;
|
||||
|
||||
class ResetPasswordController extends Controller
|
||||
{
|
||||
@@ -29,7 +29,7 @@ class ResetPasswordController extends Controller
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = RouteServiceProvider::HOME;
|
||||
protected $redirectTo = AppServiceProvider::HOME;
|
||||
|
||||
/**
|
||||
* Get the response for a successful password reset.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Auth;
|
||||
namespace App\Http\Controllers\V1\Admin\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Providers\AppServiceProvider;
|
||||
use Illuminate\Foundation\Auth\VerifiesEmails;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Providers\RouteServiceProvider;
|
||||
|
||||
class VerificationController extends Controller
|
||||
{
|
||||
@@ -26,7 +26,7 @@ class VerificationController extends Controller
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = RouteServiceProvider::HOME;
|
||||
protected $redirectTo = AppServiceProvider::HOME;
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
// Implementation taken from nova-backup-tool - https://github.com/spatie/nova-backup-tool/
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Backup;
|
||||
namespace App\Http\Controllers\V1\Admin\Backup;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
|
||||
class ApiController extends Controller
|
||||
{
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
// Implementation taken from nova-backup-tool - https://github.com/spatie/nova-backup-tool/
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Backup;
|
||||
namespace App\Http\Controllers\V1\Admin\Backup;
|
||||
|
||||
use App\Jobs\CreateBackupJob;
|
||||
use App\Rules\Backup\PathToZip;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use InvoiceShelf\Jobs\CreateBackupJob;
|
||||
use InvoiceShelf\Rules\Backup\PathToZip;
|
||||
use Spatie\Backup\BackupDestination\Backup;
|
||||
use Spatie\Backup\BackupDestination\BackupDestination;
|
||||
use Spatie\Backup\Helpers\Format;
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
// Implementation taken from nova-backup-tool - https://github.com/spatie/nova-backup-tool/
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Backup;
|
||||
namespace App\Http\Controllers\V1\Admin\Backup;
|
||||
|
||||
use App\Rules\Backup\PathToZip;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Rules\Backup\PathToZip;
|
||||
use Spatie\Backup\BackupDestination\Backup;
|
||||
use Spatie\Backup\BackupDestination\BackupDestination;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Company;
|
||||
namespace App\Http\Controllers\V1\Admin\Company;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\CompaniesRequest;
|
||||
use App\Http\Resources\CompanyResource;
|
||||
use App\Models\Company;
|
||||
use App\Models\User;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Http\Requests\CompaniesRequest;
|
||||
use InvoiceShelf\Http\Resources\CompanyResource;
|
||||
use InvoiceShelf\Models\Company;
|
||||
use InvoiceShelf\Models\User;
|
||||
use Silber\Bouncer\BouncerFacade;
|
||||
use Vinkla\Hashids\Facades\Hashids;
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Company;
|
||||
namespace App\Http\Controllers\V1\Admin\Company;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Resources\CompanyResource;
|
||||
use App\Models\Company;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Http\Resources\CompanyResource;
|
||||
use InvoiceShelf\Models\Company;
|
||||
|
||||
class CompanyController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Config;
|
||||
namespace App\Http\Controllers\V1\Admin\Config;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
|
||||
class FiscalYearsController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Config;
|
||||
namespace App\Http\Controllers\V1\Admin\Config;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
|
||||
class LanguagesController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Config;
|
||||
namespace App\Http\Controllers\V1\Admin\Config;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
|
||||
class RetrospectiveEditsController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\CustomField;
|
||||
namespace App\Http\Controllers\V1\Admin\CustomField;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\CustomFieldRequest;
|
||||
use App\Http\Resources\CustomFieldResource;
|
||||
use App\Models\CustomField;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Http\Requests\CustomFieldRequest;
|
||||
use InvoiceShelf\Http\Resources\CustomFieldResource;
|
||||
use InvoiceShelf\Models\CustomField;
|
||||
|
||||
class CustomFieldsController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Customer;
|
||||
namespace App\Http\Controllers\V1\Admin\Customer;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Resources\CustomerResource;
|
||||
use App\Models\CompanySetting;
|
||||
use App\Models\Customer;
|
||||
use App\Models\Expense;
|
||||
use App\Models\Invoice;
|
||||
use App\Models\Payment;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Http\Resources\CustomerResource;
|
||||
use InvoiceShelf\Models\CompanySetting;
|
||||
use InvoiceShelf\Models\Customer;
|
||||
use InvoiceShelf\Models\Expense;
|
||||
use InvoiceShelf\Models\Invoice;
|
||||
use InvoiceShelf\Models\Payment;
|
||||
|
||||
class CustomerStatsController extends Controller
|
||||
{
|
||||
@@ -35,15 +35,16 @@ class CustomerStatsController extends Controller
|
||||
$start = Carbon::now();
|
||||
$end = Carbon::now();
|
||||
$terms = explode('-', $fiscalYear);
|
||||
$companyStartMonth = intval($terms[0]);
|
||||
|
||||
if ($terms[0] <= $start->month) {
|
||||
$startDate->month($terms[0])->startOfMonth();
|
||||
$start->month($terms[0])->startOfMonth();
|
||||
$end->month($terms[0])->endOfMonth();
|
||||
if ($companyStartMonth <= $start->month) {
|
||||
$startDate->month($companyStartMonth)->startOfMonth();
|
||||
$start->month($companyStartMonth)->startOfMonth();
|
||||
$end->month($companyStartMonth)->endOfMonth();
|
||||
} else {
|
||||
$startDate->subYear()->month($terms[0])->startOfMonth();
|
||||
$start->subYear()->month($terms[0])->startOfMonth();
|
||||
$end->subYear()->month($terms[0])->endOfMonth();
|
||||
$startDate->subYear()->month($companyStartMonth)->startOfMonth();
|
||||
$start->subYear()->month($companyStartMonth)->startOfMonth();
|
||||
$end->subYear()->month($companyStartMonth)->endOfMonth();
|
||||
}
|
||||
|
||||
if ($request->has('previous_year')) {
|
||||
@@ -87,7 +88,7 @@ class CustomerStatsController extends Controller
|
||||
($receiptTotals[$i] - $expenseTotals[$i])
|
||||
);
|
||||
$i++;
|
||||
array_push($months, $start->format('M'));
|
||||
array_push($months, $start->translatedFormat('M'));
|
||||
$monthCounter++;
|
||||
$end->startOfMonth();
|
||||
$start->addMonth()->startOfMonth();
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Customer;
|
||||
namespace App\Http\Controllers\V1\Admin\Customer;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests;
|
||||
use App\Http\Requests\DeleteCustomersRequest;
|
||||
use App\Http\Resources\CustomerResource;
|
||||
use App\Models\Customer;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Http\Requests;
|
||||
use InvoiceShelf\Http\Requests\DeleteCustomersRequest;
|
||||
use InvoiceShelf\Http\Resources\CustomerResource;
|
||||
use InvoiceShelf\Models\Customer;
|
||||
|
||||
class CustomersController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Dashboard;
|
||||
namespace App\Http\Controllers\V1\Admin\Dashboard;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Company;
|
||||
use App\Models\CompanySetting;
|
||||
use App\Models\Customer;
|
||||
use App\Models\Estimate;
|
||||
use App\Models\Expense;
|
||||
use App\Models\Invoice;
|
||||
use App\Models\Payment;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Models\Company;
|
||||
use InvoiceShelf\Models\CompanySetting;
|
||||
use InvoiceShelf\Models\Customer;
|
||||
use InvoiceShelf\Models\Estimate;
|
||||
use InvoiceShelf\Models\Expense;
|
||||
use InvoiceShelf\Models\Invoice;
|
||||
use InvoiceShelf\Models\Payment;
|
||||
use Silber\Bouncer\BouncerFacade;
|
||||
|
||||
class DashboardController extends Controller
|
||||
@@ -40,15 +40,16 @@ class DashboardController extends Controller
|
||||
$start = Carbon::now();
|
||||
$end = Carbon::now();
|
||||
$terms = explode('-', $fiscalYear);
|
||||
$companyStartMonth = intval($terms[0]);
|
||||
|
||||
if ($terms[0] <= $start->month) {
|
||||
$startDate->month($terms[0])->startOfMonth();
|
||||
$start->month($terms[0])->startOfMonth();
|
||||
$end->month($terms[0])->endOfMonth();
|
||||
if ($companyStartMonth <= $start->month) {
|
||||
$startDate->month($companyStartMonth)->startOfMonth();
|
||||
$start->month($companyStartMonth)->startOfMonth();
|
||||
$end->month($companyStartMonth)->endOfMonth();
|
||||
} else {
|
||||
$startDate->subYear()->month($terms[0])->startOfMonth();
|
||||
$start->subYear()->month($terms[0])->startOfMonth();
|
||||
$end->subYear()->month($terms[0])->endOfMonth();
|
||||
$startDate->subYear()->month($companyStartMonth)->startOfMonth();
|
||||
$start->subYear()->month($companyStartMonth)->startOfMonth();
|
||||
$end->subYear()->month($companyStartMonth)->endOfMonth();
|
||||
}
|
||||
|
||||
if ($request->has('previous_year')) {
|
||||
@@ -90,7 +91,7 @@ class DashboardController extends Controller
|
||||
($receipt_totals[$i] - $expense_totals[$i])
|
||||
);
|
||||
$i++;
|
||||
array_push($months, $start->format('M'));
|
||||
array_push($months, $start->translatedFormat('M'));
|
||||
$monthCounter++;
|
||||
$end->startOfMonth();
|
||||
$start->addMonth()->startOfMonth();
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Estimate;
|
||||
namespace App\Http\Controllers\V1\Admin\Estimate;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Estimate;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Models\Estimate;
|
||||
|
||||
class ChangeEstimateStatusController extends Controller
|
||||
{
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\V1\Admin\Estimate;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Resources\EstimateResource;
|
||||
use App\Models\CompanySetting;
|
||||
use App\Models\Estimate;
|
||||
use App\Services\SerialNumberFormatter;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Http\Request;
|
||||
use Vinkla\Hashids\Facades\Hashids;
|
||||
|
||||
class CloneEstimateController extends Controller
|
||||
{
|
||||
/**
|
||||
* Mail a specific invoice to the corresponding customer's email address.
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function __invoke(Request $request, Estimate $estimate)
|
||||
{
|
||||
$this->authorize('create', Estimate::class);
|
||||
|
||||
$date = Carbon::now();
|
||||
|
||||
$serial = (new SerialNumberFormatter())
|
||||
->setModel($estimate)
|
||||
->setCompany($estimate->company_id)
|
||||
->setCustomer($estimate->customer_id)
|
||||
->setNextNumbers();
|
||||
|
||||
$due_date = null;
|
||||
$dueDateEnabled = CompanySetting::getSetting(
|
||||
'estimate_set_expiry_date_automatically',
|
||||
$request->header('company')
|
||||
);
|
||||
|
||||
if ($dueDateEnabled === 'YES') {
|
||||
$dueDateDays = intval(CompanySetting::getSetting(
|
||||
'estimate_expiry_date_days',
|
||||
$request->header('company')
|
||||
));
|
||||
$due_date = Carbon::now()->addDays($dueDateDays)->format('Y-m-d');
|
||||
}
|
||||
|
||||
$exchange_rate = $estimate->exchange_rate;
|
||||
|
||||
$newEstimate = Estimate::create([
|
||||
'estimate_date' => $date->format('Y-m-d'),
|
||||
'expiry_date' => $due_date,
|
||||
'estimate_number' => $serial->getNextNumber(),
|
||||
'sequence_number' => $serial->nextSequenceNumber,
|
||||
'customer_sequence_number' => $serial->nextCustomerSequenceNumber,
|
||||
'reference_number' => $estimate->reference_number,
|
||||
'customer_id' => $estimate->customer_id,
|
||||
'company_id' => $request->header('company'),
|
||||
'template_name' => $estimate->template_name,
|
||||
'status' => Estimate::STATUS_DRAFT,
|
||||
'sub_total' => $estimate->sub_total,
|
||||
'discount' => $estimate->discount,
|
||||
'discount_type' => $estimate->discount_type,
|
||||
'discount_val' => $estimate->discount_val,
|
||||
'total' => $estimate->total,
|
||||
'due_amount' => $estimate->total,
|
||||
'tax_per_item' => $estimate->tax_per_item,
|
||||
'discount_per_item' => $estimate->discount_per_item,
|
||||
'tax' => $estimate->tax,
|
||||
'notes' => $estimate->notes,
|
||||
'exchange_rate' => $exchange_rate,
|
||||
'base_total' => $estimate->total * $exchange_rate,
|
||||
'base_discount_val' => $estimate->discount_val * $exchange_rate,
|
||||
'base_sub_total' => $estimate->sub_total * $exchange_rate,
|
||||
'base_tax' => $estimate->tax * $exchange_rate,
|
||||
'base_due_amount' => $estimate->total * $exchange_rate,
|
||||
'currency_id' => $estimate->currency_id,
|
||||
'sales_tax_type' => $estimate->sales_tax_type,
|
||||
'sales_tax_address_type' => $estimate->sales_tax_address_type,
|
||||
]);
|
||||
|
||||
$newEstimate->unique_hash = Hashids::connection(Estimate::class)->encode($newEstimate->id);
|
||||
$newEstimate->save();
|
||||
$estimate->load('items.taxes');
|
||||
|
||||
$estimateItems = $estimate->items->toArray();
|
||||
|
||||
foreach ($estimateItems as $estimateItem) {
|
||||
$estimateItem['company_id'] = $request->header('company');
|
||||
$estimateItem['name'] = $estimateItem['name'];
|
||||
$estimateItem['exchange_rate'] = $exchange_rate;
|
||||
$estimateItem['base_price'] = $estimateItem['price'] * $exchange_rate;
|
||||
$estimateItem['base_discount_val'] = $estimateItem['discount_val'] * $exchange_rate;
|
||||
$estimateItem['base_tax'] = $estimateItem['tax'] * $exchange_rate;
|
||||
$estimateItem['base_total'] = $estimateItem['total'] * $exchange_rate;
|
||||
|
||||
$item = $newEstimate->items()->create($estimateItem);
|
||||
|
||||
if (array_key_exists('taxes', $estimateItem) && $estimateItem['taxes']) {
|
||||
foreach ($estimateItem['taxes'] as $tax) {
|
||||
$tax['company_id'] = $request->header('company');
|
||||
|
||||
if ($tax['amount']) {
|
||||
$item->taxes()->create($tax);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($estimate->taxes) {
|
||||
foreach ($estimate->taxes->toArray() as $tax) {
|
||||
$tax['company_id'] = $request->header('company');
|
||||
$newEstimate->taxes()->create($tax);
|
||||
}
|
||||
}
|
||||
|
||||
if ($estimate->fields()->exists()) {
|
||||
$customFields = [];
|
||||
|
||||
foreach ($estimate->fields as $data) {
|
||||
$customFields[] = [
|
||||
'id' => $data->custom_field_id,
|
||||
'value' => $data->defaultAnswer,
|
||||
];
|
||||
}
|
||||
|
||||
$newEstimate->addCustomFields($customFields);
|
||||
}
|
||||
|
||||
return new EstimateResource($newEstimate);
|
||||
}
|
||||
}
|
||||
@@ -1,16 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Estimate;
|
||||
namespace App\Http\Controllers\V1\Admin\Estimate;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Resources\InvoiceResource;
|
||||
use App\Models\CompanySetting;
|
||||
use App\Models\Estimate;
|
||||
use App\Models\Invoice;
|
||||
use App\Services\SerialNumberFormatter;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Http\Resources\InvoiceResource;
|
||||
use InvoiceShelf\Models\CompanySetting;
|
||||
use InvoiceShelf\Models\Estimate;
|
||||
use InvoiceShelf\Models\Invoice;
|
||||
use InvoiceShelf\Services\SerialNumberFormatter;
|
||||
use Vinkla\Hashids\Facades\Hashids;
|
||||
|
||||
class ConvertEstimateController extends Controller
|
||||
@@ -35,10 +35,10 @@ class ConvertEstimateController extends Controller
|
||||
);
|
||||
|
||||
if ($dueDateEnabled === 'YES') {
|
||||
$dueDateDays = CompanySetting::getSetting(
|
||||
$dueDateDays = intval(CompanySetting::getSetting(
|
||||
'invoice_due_date_days',
|
||||
$request->header('company')
|
||||
);
|
||||
));
|
||||
$due_date = Carbon::now()->addDays($dueDateDays)->format('Y-m-d');
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Estimate;
|
||||
namespace App\Http\Controllers\V1\Admin\Estimate;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Estimate;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Models\Estimate;
|
||||
|
||||
class EstimateTemplatesController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Estimate;
|
||||
namespace App\Http\Controllers\V1\Admin\Estimate;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\DeleteEstimatesRequest;
|
||||
use App\Http\Requests\EstimatesRequest;
|
||||
use App\Http\Resources\EstimateResource;
|
||||
use App\Jobs\GenerateEstimatePdfJob;
|
||||
use App\Models\Estimate;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Http\Requests\DeleteEstimatesRequest;
|
||||
use InvoiceShelf\Http\Requests\EstimatesRequest;
|
||||
use InvoiceShelf\Http\Resources\EstimateResource;
|
||||
use InvoiceShelf\Jobs\GenerateEstimatePdfJob;
|
||||
use InvoiceShelf\Models\Estimate;
|
||||
|
||||
class EstimatesController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Estimate;
|
||||
namespace App\Http\Controllers\V1\Admin\Estimate;
|
||||
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Http\Requests\SendEstimatesRequest;
|
||||
use InvoiceShelf\Models\Estimate;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\SendEstimatesRequest;
|
||||
use App\Models\Estimate;
|
||||
|
||||
class SendEstimateController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Estimate;
|
||||
namespace App\Http\Controllers\V1\Admin\Estimate;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\SendEstimatesRequest;
|
||||
use App\Models\Estimate;
|
||||
use Illuminate\Mail\Markdown;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Http\Requests\SendEstimatesRequest;
|
||||
use InvoiceShelf\Models\Estimate;
|
||||
|
||||
class SendEstimatePreviewController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\ExchangeRate;
|
||||
namespace App\Http\Controllers\V1\Admin\ExchangeRate;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\ExchangeRateProviderRequest;
|
||||
use App\Http\Resources\ExchangeRateProviderResource;
|
||||
use App\Models\ExchangeRateProvider;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Http\Requests\ExchangeRateProviderRequest;
|
||||
use InvoiceShelf\Http\Resources\ExchangeRateProviderResource;
|
||||
use InvoiceShelf\Models\ExchangeRateProvider;
|
||||
|
||||
class ExchangeRateProviderController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\ExchangeRate;
|
||||
namespace App\Http\Controllers\V1\Admin\ExchangeRate;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Currency;
|
||||
use App\Models\ExchangeRateProvider;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Models\Currency;
|
||||
use InvoiceShelf\Models\ExchangeRateProvider;
|
||||
|
||||
class GetActiveProviderController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\ExchangeRate;
|
||||
namespace App\Http\Controllers\V1\Admin\ExchangeRate;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\CompanySetting;
|
||||
use App\Models\Currency;
|
||||
use App\Models\ExchangeRateLog;
|
||||
use App\Models\ExchangeRateProvider;
|
||||
use App\Traits\ExchangeRateProvidersTrait;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Arr;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Models\CompanySetting;
|
||||
use InvoiceShelf\Models\Currency;
|
||||
use InvoiceShelf\Models\ExchangeRateLog;
|
||||
use InvoiceShelf\Models\ExchangeRateProvider;
|
||||
use InvoiceShelf\Traits\ExchangeRateProvidersTrait;
|
||||
|
||||
class GetExchangeRateController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\ExchangeRate;
|
||||
namespace App\Http\Controllers\V1\Admin\ExchangeRate;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\ExchangeRateProvider;
|
||||
use App\Traits\ExchangeRateProvidersTrait;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Models\ExchangeRateProvider;
|
||||
use InvoiceShelf\Traits\ExchangeRateProvidersTrait;
|
||||
|
||||
class GetSupportedCurrenciesController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\ExchangeRate;
|
||||
namespace App\Http\Controllers\V1\Admin\ExchangeRate;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\ExchangeRateProvider;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Models\ExchangeRateProvider;
|
||||
|
||||
class GetUsedCurrenciesController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Expense;
|
||||
namespace App\Http\Controllers\V1\Admin\Expense;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\ExpenseCategoryRequest;
|
||||
use App\Http\Resources\ExpenseCategoryResource;
|
||||
use App\Models\ExpenseCategory;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Http\Requests\ExpenseCategoryRequest;
|
||||
use InvoiceShelf\Http\Resources\ExpenseCategoryResource;
|
||||
use InvoiceShelf\Models\ExpenseCategory;
|
||||
|
||||
class ExpenseCategoriesController extends Controller
|
||||
{
|
||||
@@ -60,7 +60,7 @@ class ExpenseCategoriesController extends Controller
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \InvoiceShelf\Models\ExpenseCategory $ExpenseCategory
|
||||
* @param \App\Models\ExpenseCategory $ExpenseCategory
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(ExpenseCategoryRequest $request, ExpenseCategory $category)
|
||||
@@ -75,7 +75,7 @@ class ExpenseCategoriesController extends Controller
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param \InvoiceShelf\ExpensesCategory $category
|
||||
* @param \App\ExpensesCategory $category
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function destroy(ExpenseCategory $category)
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Expense;
|
||||
namespace App\Http\Controllers\V1\Admin\Expense;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\DeleteExpensesRequest;
|
||||
use App\Http\Requests\ExpenseRequest;
|
||||
use App\Http\Resources\ExpenseResource;
|
||||
use App\Models\Expense;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Http\Requests\DeleteExpensesRequest;
|
||||
use InvoiceShelf\Http\Requests\ExpenseRequest;
|
||||
use InvoiceShelf\Http\Resources\ExpenseResource;
|
||||
use InvoiceShelf\Models\Expense;
|
||||
|
||||
class ExpensesController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Expense;
|
||||
namespace App\Http\Controllers\V1\Admin\Expense;
|
||||
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Models\Expense;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Expense;
|
||||
|
||||
class ShowReceiptController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Expense;
|
||||
namespace App\Http\Controllers\V1\Admin\Expense;
|
||||
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Http\Requests\UploadExpenseReceiptRequest;
|
||||
use InvoiceShelf\Models\Expense;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\UploadExpenseReceiptRequest;
|
||||
use App\Models\Expense;
|
||||
|
||||
class UploadReceiptController extends Controller
|
||||
{
|
||||
/**
|
||||
* Upload the expense receipts to storage.
|
||||
*
|
||||
* @param \InvoiceShelf\Http\Requests\ExpenseRequest $request
|
||||
* @param \App\Http\Requests\ExpenseRequest $request
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function __invoke(UploadExpenseReceiptRequest $request, Expense $expense)
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\General;
|
||||
namespace App\Http\Controllers\V1\Admin\General;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Resources\CompanyResource;
|
||||
use App\Http\Resources\UserResource;
|
||||
use App\Models\Company;
|
||||
use App\Models\CompanySetting;
|
||||
use App\Models\Currency;
|
||||
use App\Models\Module;
|
||||
use App\Models\Setting;
|
||||
use App\Traits\GeneratesMenuTrait;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Http\Resources\CompanyResource;
|
||||
use InvoiceShelf\Http\Resources\UserResource;
|
||||
use InvoiceShelf\Models\Company;
|
||||
use InvoiceShelf\Models\CompanySetting;
|
||||
use InvoiceShelf\Models\Currency;
|
||||
use InvoiceShelf\Models\Module;
|
||||
use InvoiceShelf\Models\Setting;
|
||||
use InvoiceShelf\Traits\GeneratesMenuTrait;
|
||||
use Silber\Bouncer\BouncerFacade;
|
||||
|
||||
class BootstrapController extends Controller
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\General;
|
||||
namespace App\Http\Controllers\V1\Admin\General;
|
||||
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Http\Requests\BulkExchangeRateRequest;
|
||||
use InvoiceShelf\Models\CompanySetting;
|
||||
use InvoiceShelf\Models\Estimate;
|
||||
use InvoiceShelf\Models\Invoice;
|
||||
use InvoiceShelf\Models\Payment;
|
||||
use InvoiceShelf\Models\Tax;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\BulkExchangeRateRequest;
|
||||
use App\Models\CompanySetting;
|
||||
use App\Models\Estimate;
|
||||
use App\Models\Invoice;
|
||||
use App\Models\Payment;
|
||||
use App\Models\Tax;
|
||||
|
||||
class BulkExchangeRateController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\General;
|
||||
namespace App\Http\Controllers\V1\Admin\General;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
|
||||
class ConfigController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\General;
|
||||
namespace App\Http\Controllers\V1\Admin\General;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Resources\CountryResource;
|
||||
use App\Models\Country;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Http\Resources\CountryResource;
|
||||
use InvoiceShelf\Models\Country;
|
||||
|
||||
class CountriesController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\General;
|
||||
namespace App\Http\Controllers\V1\Admin\General;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Resources\CurrencyResource;
|
||||
use App\Models\Currency;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Http\Resources\CurrencyResource;
|
||||
use InvoiceShelf\Models\Currency;
|
||||
|
||||
class CurrenciesController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\General;
|
||||
namespace App\Http\Controllers\V1\Admin\General;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Space\DateFormatter;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Space\DateFormatter;
|
||||
|
||||
class DateFormatsController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\General;
|
||||
namespace App\Http\Controllers\V1\Admin\General;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Currency;
|
||||
use App\Models\Estimate;
|
||||
use App\Models\Invoice;
|
||||
use App\Models\Payment;
|
||||
use App\Models\Tax;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Models\Currency;
|
||||
use InvoiceShelf\Models\Estimate;
|
||||
use InvoiceShelf\Models\Invoice;
|
||||
use InvoiceShelf\Models\Payment;
|
||||
use InvoiceShelf\Models\Tax;
|
||||
|
||||
class GetAllUsedCurrenciesController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\General;
|
||||
namespace App\Http\Controllers\V1\Admin\General;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Estimate;
|
||||
use App\Models\Invoice;
|
||||
use App\Models\Payment;
|
||||
use App\Services\SerialNumberFormatter;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Models\Estimate;
|
||||
use InvoiceShelf\Models\Invoice;
|
||||
use InvoiceShelf\Models\Payment;
|
||||
use InvoiceShelf\Services\SerialNumberFormatter;
|
||||
|
||||
class NextNumberController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\General;
|
||||
namespace App\Http\Controllers\V1\Admin\General;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\NotesRequest;
|
||||
use App\Http\Resources\NoteResource;
|
||||
use App\Models\Note;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Http\Requests\NotesRequest;
|
||||
use InvoiceShelf\Http\Resources\NoteResource;
|
||||
use InvoiceShelf\Models\Note;
|
||||
|
||||
class NotesController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\General;
|
||||
namespace App\Http\Controllers\V1\Admin\General;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\SerialNumberFormatter;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Services\SerialNumberFormatter;
|
||||
|
||||
class NumberPlaceholdersController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\General;
|
||||
namespace App\Http\Controllers\V1\Admin\General;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Customer;
|
||||
use App\Models\User;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Models\Customer;
|
||||
use InvoiceShelf\Models\User;
|
||||
|
||||
class SearchController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\General;
|
||||
namespace App\Http\Controllers\V1\Admin\General;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\User;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Models\User;
|
||||
|
||||
class SearchUsersController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\General;
|
||||
namespace App\Http\Controllers\V1\Admin\General;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Space\TimeZones;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Space\TimeZones;
|
||||
|
||||
class TimezonesController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Invoice;
|
||||
namespace App\Http\Controllers\V1\Admin\Invoice;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Invoice;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Models\Invoice;
|
||||
|
||||
class ChangeInvoiceStatusController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Invoice;
|
||||
namespace App\Http\Controllers\V1\Admin\Invoice;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Resources\InvoiceResource;
|
||||
use App\Models\CompanySetting;
|
||||
use App\Models\Invoice;
|
||||
use App\Services\SerialNumberFormatter;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Http\Resources\InvoiceResource;
|
||||
use InvoiceShelf\Models\CompanySetting;
|
||||
use InvoiceShelf\Models\Invoice;
|
||||
use InvoiceShelf\Services\SerialNumberFormatter;
|
||||
use Vinkla\Hashids\Facades\Hashids;
|
||||
|
||||
class CloneInvoiceController extends Controller
|
||||
@@ -37,10 +37,10 @@ class CloneInvoiceController extends Controller
|
||||
);
|
||||
|
||||
if ($dueDateEnabled === 'YES') {
|
||||
$dueDateDays = CompanySetting::getSetting(
|
||||
$dueDateDays = intval(CompanySetting::getSetting(
|
||||
'invoice_due_date_days',
|
||||
$request->header('company')
|
||||
);
|
||||
));
|
||||
$due_date = Carbon::now()->addDays($dueDateDays)->format('Y-m-d');
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Invoice;
|
||||
namespace App\Http\Controllers\V1\Admin\Invoice;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Invoice;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Models\Invoice;
|
||||
|
||||
class InvoiceTemplatesController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Invoice;
|
||||
namespace App\Http\Controllers\V1\Admin\Invoice;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests;
|
||||
use App\Http\Requests\DeleteInvoiceRequest;
|
||||
use App\Http\Resources\InvoiceResource;
|
||||
use App\Jobs\GenerateInvoicePdfJob;
|
||||
use App\Models\Invoice;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Http\Requests;
|
||||
use InvoiceShelf\Http\Requests\DeleteInvoiceRequest;
|
||||
use InvoiceShelf\Http\Resources\InvoiceResource;
|
||||
use InvoiceShelf\Jobs\GenerateInvoicePdfJob;
|
||||
use InvoiceShelf\Models\Invoice;
|
||||
|
||||
class InvoicesController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Invoice;
|
||||
namespace App\Http\Controllers\V1\Admin\Invoice;
|
||||
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Http\Requests\SendInvoiceRequest;
|
||||
use InvoiceShelf\Models\Invoice;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\SendInvoiceRequest;
|
||||
use App\Models\Invoice;
|
||||
|
||||
class SendInvoiceController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Invoice;
|
||||
namespace App\Http\Controllers\V1\Admin\Invoice;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\SendInvoiceRequest;
|
||||
use App\Models\Invoice;
|
||||
use Illuminate\Mail\Markdown;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Http\Requests\SendInvoiceRequest;
|
||||
use InvoiceShelf\Models\Invoice;
|
||||
|
||||
class SendInvoicePreviewController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Item;
|
||||
namespace App\Http\Controllers\V1\Admin\Item;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests;
|
||||
use App\Http\Requests\DeleteItemsRequest;
|
||||
use App\Http\Resources\ItemResource;
|
||||
use App\Models\Item;
|
||||
use App\Models\TaxType;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Http\Requests;
|
||||
use InvoiceShelf\Http\Requests\DeleteItemsRequest;
|
||||
use InvoiceShelf\Http\Resources\ItemResource;
|
||||
use InvoiceShelf\Models\Item;
|
||||
use InvoiceShelf\Models\TaxType;
|
||||
|
||||
class ItemsController extends Controller
|
||||
{
|
||||
@@ -40,7 +40,7 @@ class ItemsController extends Controller
|
||||
/**
|
||||
* Create Item.
|
||||
*
|
||||
* @param InvoiceShelf\Http\Requests\ItemsRequest $request
|
||||
* @param App\Http\Requests\ItemsRequest $request
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function store(Requests\ItemsRequest $request)
|
||||
@@ -67,7 +67,7 @@ class ItemsController extends Controller
|
||||
/**
|
||||
* Update an existing Item.
|
||||
*
|
||||
* @param InvoiceShelf\Http\Requests\ItemsRequest $request
|
||||
* @param App\Http\Requests\ItemsRequest $request
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function update(Requests\ItemsRequest $request, Item $item)
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Item;
|
||||
namespace App\Http\Controllers\V1\Admin\Item;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\UnitRequest;
|
||||
use App\Http\Resources\UnitResource;
|
||||
use App\Models\Unit;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Http\Requests\UnitRequest;
|
||||
use InvoiceShelf\Http\Resources\UnitResource;
|
||||
use InvoiceShelf\Models\Unit;
|
||||
|
||||
class UnitsController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Mobile;
|
||||
namespace App\Http\Controllers\V1\Admin\Mobile;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\LoginRequest;
|
||||
use App\Models\User;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Http\Requests\LoginRequest;
|
||||
use InvoiceShelf\Models\User;
|
||||
|
||||
class AuthController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Modules;
|
||||
namespace App\Http\Controllers\V1\Admin\Modules;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Space\ModuleInstaller;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Space\ModuleInstaller;
|
||||
|
||||
class ApiTokenController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Modules;
|
||||
namespace App\Http\Controllers\V1\Admin\Modules;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Space\ModuleInstaller;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Space\ModuleInstaller;
|
||||
|
||||
class CompleteModuleInstallationController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Modules;
|
||||
namespace App\Http\Controllers\V1\Admin\Modules;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Space\ModuleInstaller;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Space\ModuleInstaller;
|
||||
|
||||
class CopyModuleController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Modules;
|
||||
namespace App\Http\Controllers\V1\Admin\Modules;
|
||||
|
||||
use App\Events\ModuleDisabledEvent;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Module as ModelsModule;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Events\ModuleDisabledEvent;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Models\Module as ModelsModule;
|
||||
use Nwidart\Modules\Facades\Module;
|
||||
|
||||
class DisableModuleController extends Controller
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Modules;
|
||||
namespace App\Http\Controllers\V1\Admin\Modules;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Space\ModuleInstaller;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Space\ModuleInstaller;
|
||||
|
||||
class DownloadModuleController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Modules;
|
||||
namespace App\Http\Controllers\V1\Admin\Modules;
|
||||
|
||||
use App\Events\ModuleEnabledEvent;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Module as ModelsModule;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Events\ModuleEnabledEvent;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Models\Module as ModelsModule;
|
||||
use Nwidart\Modules\Facades\Module;
|
||||
|
||||
class EnableModuleController extends Controller
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Modules;
|
||||
namespace App\Http\Controllers\V1\Admin\Modules;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Resources\ModuleResource;
|
||||
use App\Space\ModuleInstaller;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Http\Resources\ModuleResource;
|
||||
use InvoiceShelf\Space\ModuleInstaller;
|
||||
|
||||
class ModuleController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Modules;
|
||||
namespace App\Http\Controllers\V1\Admin\Modules;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Space\ModuleInstaller;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Space\ModuleInstaller;
|
||||
|
||||
class ModulesController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Modules;
|
||||
namespace App\Http\Controllers\V1\Admin\Modules;
|
||||
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Http\Requests\UnzipUpdateRequest;
|
||||
use InvoiceShelf\Space\ModuleInstaller;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\UnzipUpdateRequest;
|
||||
use App\Space\ModuleInstaller;
|
||||
|
||||
class UnzipModuleController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Modules;
|
||||
namespace App\Http\Controllers\V1\Admin\Modules;
|
||||
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Http\Requests\UploadModuleRequest;
|
||||
use InvoiceShelf\Space\ModuleInstaller;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\UploadModuleRequest;
|
||||
use App\Space\ModuleInstaller;
|
||||
|
||||
class UploadModuleController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Payment;
|
||||
namespace App\Http\Controllers\V1\Admin\Payment;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\PaymentMethodRequest;
|
||||
use App\Http\Resources\PaymentMethodResource;
|
||||
use App\Models\PaymentMethod;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Http\Requests\PaymentMethodRequest;
|
||||
use InvoiceShelf\Http\Resources\PaymentMethodResource;
|
||||
use InvoiceShelf\Models\PaymentMethod;
|
||||
|
||||
class PaymentMethodsController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Payment;
|
||||
namespace App\Http\Controllers\V1\Admin\Payment;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\DeletePaymentsRequest;
|
||||
use App\Http\Requests\PaymentRequest;
|
||||
use App\Http\Resources\PaymentResource;
|
||||
use App\Models\Payment;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Http\Requests\DeletePaymentsRequest;
|
||||
use InvoiceShelf\Http\Requests\PaymentRequest;
|
||||
use InvoiceShelf\Http\Resources\PaymentResource;
|
||||
use InvoiceShelf\Models\Payment;
|
||||
|
||||
class PaymentsController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Payment;
|
||||
namespace App\Http\Controllers\V1\Admin\Payment;
|
||||
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Http\Requests\SendPaymentRequest;
|
||||
use InvoiceShelf\Models\Payment;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\SendPaymentRequest;
|
||||
use App\Models\Payment;
|
||||
|
||||
class SendPaymentController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\Payment;
|
||||
namespace App\Http\Controllers\V1\Admin\Payment;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Payment;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Mail\Markdown;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Models\Payment;
|
||||
|
||||
class SendPaymentPreviewController extends Controller
|
||||
{
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\RecurringInvoice;
|
||||
namespace App\Http\Controllers\V1\Admin\RecurringInvoice;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\RecurringInvoiceRequest;
|
||||
use App\Http\Resources\RecurringInvoiceResource;
|
||||
use App\Models\RecurringInvoice;
|
||||
use Illuminate\Http\Request;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Http\Requests\RecurringInvoiceRequest;
|
||||
use InvoiceShelf\Http\Resources\RecurringInvoiceResource;
|
||||
use InvoiceShelf\Models\RecurringInvoice;
|
||||
|
||||
class RecurringInvoiceController extends Controller
|
||||
{
|
||||
@@ -76,7 +76,7 @@ class RecurringInvoiceController extends Controller
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param \InvoiceShelf\Models\RecurringInvoice $recurringInvoice
|
||||
* @param \App\Models\RecurringInvoice $recurringInvoice
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function delete(Request $request)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user