"}}},i=t(0),o=Object(i.a)(e,(function(){return(0,this._self._c)("p",{staticClass:"demo"},[this._v("\n "+this._s(this.msg)+"\n")])}),[],!1,null,null,null);s.default=o.exports}}]);
--------------------------------------------------------------------------------
/src/Http/Livewire/NotifyToast.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | @include('laravel-crm::partials.form.text',[
4 | 'name' => 'name',
5 | 'label' => ucfirst(trans('laravel-crm::lang.name')),
6 | 'value' => old('name', $pipeline->name ?? null),
7 | 'required' => 'true'
8 | ])
9 |
10 |
--------------------------------------------------------------------------------
/src/Repositories/OrderRepository.php:
--------------------------------------------------------------------------------
1 | morphMany(\VentureDrake\LaravelCrm\Models\Email::class, 'emailable');
10 | }
11 |
12 | public function getPrimaryEmail()
13 | {
14 | return $this->emails()->where('primary', 1)->first();
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/Traits/HasCrmPhones.php:
--------------------------------------------------------------------------------
1 | morphMany(\VentureDrake\LaravelCrm\Models\Phone::class, 'phoneable');
10 | }
11 |
12 | public function getPrimaryPhone()
13 | {
14 | return $this->phones()->where('primary', 1)->first();
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/resources/views/partials/labels.blade.php:
--------------------------------------------------------------------------------
1 | @foreach($labels as $label)
2 | @if((isset($limit) && $loop->iteration <= $limit) || !isset($limit))
3 | {{ $label->name }}
4 | @endif
5 | @endforeach
6 | @if(isset($limit) && $labels->count() > $limit)
7 | +{{ $labels->count() - $limit }}
8 | @endif
--------------------------------------------------------------------------------
/src/Repositories/OrganisationRepository.php:
--------------------------------------------------------------------------------
1 |
2 | {{--{{ ucfirst(__('laravel-crm::lang.planned')) }}
3 |
4 |
5 | {{ ucfirst(__('laravel-crm::lang.complete')) }}
6 |
--}}
7 | @foreach($activities as $activity)
8 | @include('laravel-crm::activities.partials.activity', $activity)
9 | @endforeach
10 |
11 |
--------------------------------------------------------------------------------
/src/Traits/HasCrmAddresses.php:
--------------------------------------------------------------------------------
1 | morphMany(\VentureDrake\LaravelCrm\Models\Address::class, 'addressable');
10 | }
11 |
12 | public function getPrimaryAddress()
13 | {
14 | return $this->addresses()->where('primary', 1)->first();
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/LaravelCrm.php:
--------------------------------------------------------------------------------
1 | "
7 | ],
8 | "license": "MIT",
9 | "homepage": "",
10 | "private": true,
11 | "ignore": [
12 | "**/.*",
13 | "node_modules",
14 | "bower_components",
15 | "test",
16 | "tests"
17 | ],
18 | "dependencies": {
19 | "bootstrap-duallistbox": "^4.0.2"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/Http/Helpers/Validate.php:
--------------------------------------------------------------------------------
1 | where('crm_role', 1);
12 | }
13 |
14 | public function scopeCrmNotOwner($query)
15 | {
16 | return $query->where('crm_role', 1)->where('name', '<>', 'Owner');
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/Http/Controllers/Integrations/XeroController.php:
--------------------------------------------------------------------------------
1 | {
13 | // ...apply enhancements for the site.
14 | }
15 |
--------------------------------------------------------------------------------
/database/factories/ProductCategoryFactory.php:
--------------------------------------------------------------------------------
1 | define(ProductCategory::class, function (Faker $faker) {
11 | return [
12 | 'external_id' => $faker->uuid,
13 | 'name' => $faker->word,
14 | ];
15 | });
16 |
--------------------------------------------------------------------------------
/resources/views/mail/templates/send-purchase-order/message.blade.php:
--------------------------------------------------------------------------------
1 | Hi,
2 |
3 | Here's purchase order {{ $purchaseOrder->purchase_order_id }} for {{ money($purchaseOrder->total, $purchaseOrder->currency) }}.
4 |
5 | If you have any questions, please let us know.
6 |
7 | Thanks,
8 | {{ \VentureDrake\LaravelCrm\Models\Setting::where('name', 'organisation_name')->first()->value }}
9 | @if($purchaseOrder->terms)
10 |
11 | Terms
12 | {{ $purchaseOrder->terms }}
13 | @endif
--------------------------------------------------------------------------------
/src/Http/Controllers/Controller.php:
--------------------------------------------------------------------------------
1 | first()->value ?? 'Y/m/d';
12 | }
13 |
14 | public static function timeFormat()
15 | {
16 | return Setting::where('name', 'time_format')->first()->value ?? 'H:i';
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/database/factories/OrganisationFactory.php:
--------------------------------------------------------------------------------
1 | define(Organisation::class, function (Faker $faker) {
11 | return [
12 | 'external_id' => $faker->uuid,
13 | 'name' => $faker->company,
14 | 'user_owner_id' => 1,
15 | ];
16 | });
17 |
--------------------------------------------------------------------------------
/docs/src/.vuepress/dist/assets/js/34.9bbb9b1d.js:
--------------------------------------------------------------------------------
1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[34],{202:function(t,e,a){"use strict";a.r(e);var s=a(0),l=Object(s.a)({},(function(){this._self._c;return this._m(0)}),[function(){var t=this._self._c;return t("div",{staticClass:"content"},[t("h1",{attrs:{id:"welcome-to-laravel-crm"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#welcome-to-laravel-crm"}},[this._v("#")]),this._v(" Welcome to Laravel CRM!")])])}],!1,null,null,null);e.default=l.exports}}]);
--------------------------------------------------------------------------------
/docs/src/.vuepress/dist/assets/js/35.b6a7d6c0.js:
--------------------------------------------------------------------------------
1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[35],{203:function(t,e,a){"use strict";a.r(e);var s=a(0),l=Object(s.a)({},(function(){this._self._c;return this._m(0)}),[function(){var t=this._self._c;return t("div",{staticClass:"content"},[t("h1",{attrs:{id:"welcome-to-laravel-crm"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#welcome-to-laravel-crm"}},[this._v("#")]),this._v(" Welcome to Laravel CRM!")])])}],!1,null,null,null);e.default=l.exports}}]);
--------------------------------------------------------------------------------
/docs/src/.vuepress/dist/assets/js/2.dd4257e1.js:
--------------------------------------------------------------------------------
1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[2],{167:function(t,e,n){},168:function(t,e,n){"use strict";n(167)},172:function(t,e,n){"use strict";n.r(e);var i={functional:!0,props:{type:{type:String,default:"tip"},text:String,vertical:{type:String,default:"top"}},render:function(t,e){var n=e.props,i=e.slots;return t("span",{class:["badge",n.type,n.vertical]},n.text||i().default)}},p=(n(168),n(0)),r=Object(p.a)(i,void 0,void 0,!1,null,"099ab69c",null);e.default=r.exports}}]);
--------------------------------------------------------------------------------
/resources/views/mail/templates/send-quote/message.blade.php:
--------------------------------------------------------------------------------
1 | Hi,
2 |
3 | Here's quote {{ $quote->reference ?? null }} for {{ money($quote->total, $quote->currency) }} {{ $quote->currency ?? null }}.
4 |
5 | Please advise if you accept the quote or if you have any questions, let us know.
6 |
7 | [Online Quote Link]
8 |
9 | Thanks,
10 | {{ \VentureDrake\LaravelCrm\Models\Setting::where('name', 'organisation_name')->first()->value }}
11 | @if($quote->terms)
12 |
13 | Terms
14 | {{ $quote->terms }}
15 | @endif
--------------------------------------------------------------------------------
/docs/src/.vuepress/dist/assets/js/11.181af722.js:
--------------------------------------------------------------------------------
1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[11],{179:function(t,s,n){"use strict";n.r(s);var e=n(0),a=Object(e.a)({},(function(){this._self._c;return this._m(0)}),[function(){var t=this._self._c;return t("div",{staticClass:"content"},[t("h1",{attrs:{id:"xero"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#xero"}},[this._v("#")]),this._v(" Xero")]),this._v(" "),t("p"),t("div",{staticClass:"table-of-contents"},[t("ul")]),t("p")])}],!1,null,null,null);s.default=a.exports}}]);
--------------------------------------------------------------------------------
/docs/src/.vuepress/dist/assets/js/18.8282080a.js:
--------------------------------------------------------------------------------
1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[18],{186:function(t,s,a){"use strict";a.r(s);var n=a(0),e=Object(n.a)({},(function(){this._self._c;return this._m(0)}),[function(){var t=this._self._c;return t("div",{staticClass:"content"},[t("h1",{attrs:{id:"deals"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#deals"}},[this._v("#")]),this._v(" Deals")]),this._v(" "),t("p"),t("div",{staticClass:"table-of-contents"},[t("ul")]),t("p")])}],!1,null,null,null);s.default=e.exports}}]);
--------------------------------------------------------------------------------
/docs/src/.vuepress/dist/assets/js/22.75117c29.js:
--------------------------------------------------------------------------------
1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[22],{190:function(t,s,a){"use strict";a.r(s);var n=a(0),e=Object(n.a)({},(function(){this._self._c;return this._m(0)}),[function(){var t=this._self._c;return t("div",{staticClass:"content"},[t("h1",{attrs:{id:"leads"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#leads"}},[this._v("#")]),this._v(" Leads")]),this._v(" "),t("p"),t("div",{staticClass:"table-of-contents"},[t("ul")]),t("p")])}],!1,null,null,null);s.default=e.exports}}]);
--------------------------------------------------------------------------------
/docs/src/.vuepress/dist/assets/js/31.0a0f5a79.js:
--------------------------------------------------------------------------------
1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[31],{199:function(t,s,n){"use strict";n.r(s);var e=n(0),a=Object(e.a)({},(function(){this._self._c;return this._m(0)}),[function(){var t=this._self._c;return t("div",{staticClass:"content"},[t("h1",{attrs:{id:"roles"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#roles"}},[this._v("#")]),this._v(" Roles")]),this._v(" "),t("p"),t("div",{staticClass:"table-of-contents"},[t("ul")]),t("p")])}],!1,null,null,null);s.default=a.exports}}]);
--------------------------------------------------------------------------------
/docs/src/.vuepress/dist/assets/js/32.da9a1ebb.js:
--------------------------------------------------------------------------------
1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[32],{200:function(t,s,a){"use strict";a.r(s);var n=a(0),e=Object(n.a)({},(function(){this._self._c;return this._m(0)}),[function(){var t=this._self._c;return t("div",{staticClass:"content"},[t("h1",{attrs:{id:"teams"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#teams"}},[this._v("#")]),this._v(" Teams")]),this._v(" "),t("p"),t("div",{staticClass:"table-of-contents"},[t("ul")]),t("p")])}],!1,null,null,null);s.default=e.exports}}]);
--------------------------------------------------------------------------------
/docs/src/.vuepress/dist/assets/js/33.9e9bada4.js:
--------------------------------------------------------------------------------
1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[33],{201:function(s,t,n){"use strict";n.r(t);var e=n(0),a=Object(e.a)({},(function(){this._self._c;return this._m(0)}),[function(){var s=this._self._c;return s("div",{staticClass:"content"},[s("h1",{attrs:{id:"users"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#users"}},[this._v("#")]),this._v(" Users")]),this._v(" "),s("p"),s("div",{staticClass:"table-of-contents"},[s("ul")]),s("p")])}],!1,null,null,null);t.default=a.exports}}]);
--------------------------------------------------------------------------------
/src/Models/Model.php:
--------------------------------------------------------------------------------
1 | save($options);
16 | });
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/docs/src/.vuepress/dist/assets/js/21.71343a74.js:
--------------------------------------------------------------------------------
1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[21],{189:function(t,s,a){"use strict";a.r(s);var n=a(0),e=Object(n.a)({},(function(){this._self._c;return this._m(0)}),[function(){var t=this._self._c;return t("div",{staticClass:"content"},[t("h1",{attrs:{id:"labels"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#labels"}},[this._v("#")]),this._v(" Labels")]),this._v(" "),t("p"),t("div",{staticClass:"table-of-contents"},[t("ul")]),t("p")])}],!1,null,null,null);s.default=e.exports}}]);
--------------------------------------------------------------------------------
/docs/src/.vuepress/dist/assets/js/23.c49fc3c2.js:
--------------------------------------------------------------------------------
1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[23],{191:function(t,s,n){"use strict";n.r(s);var r=n(0),e=Object(r.a)({},(function(){this._self._c;return this._m(0)}),[function(){var t=this._self._c;return t("div",{staticClass:"content"},[t("h1",{attrs:{id:"orders"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#orders"}},[this._v("#")]),this._v(" Orders")]),this._v(" "),t("p"),t("div",{staticClass:"table-of-contents"},[t("ul")]),t("p")])}],!1,null,null,null);s.default=e.exports}}]);
--------------------------------------------------------------------------------
/docs/src/.vuepress/dist/assets/js/25.14b1235b.js:
--------------------------------------------------------------------------------
1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[25],{193:function(t,s,e){"use strict";e.r(s);var n=e(0),a=Object(n.a)({},(function(){this._self._c;return this._m(0)}),[function(){var t=this._self._c;return t("div",{staticClass:"content"},[t("h1",{attrs:{id:"people"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#people"}},[this._v("#")]),this._v(" People")]),this._v(" "),t("p"),t("div",{staticClass:"table-of-contents"},[t("ul")]),t("p")])}],!1,null,null,null);s.default=a.exports}}]);
--------------------------------------------------------------------------------
/docs/src/.vuepress/dist/assets/js/30.b57d044e.js:
--------------------------------------------------------------------------------
1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[30],{198:function(t,s,n){"use strict";n.r(s);var e=n(0),a=Object(e.a)({},(function(){this._self._c;return this._m(0)}),[function(){var t=this._self._c;return t("div",{staticClass:"content"},[t("h1",{attrs:{id:"quotes"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#quotes"}},[this._v("#")]),this._v(" Quotes")]),this._v(" "),t("p"),t("div",{staticClass:"table-of-contents"},[t("ul")]),t("p")])}],!1,null,null,null);s.default=a.exports}}]);
--------------------------------------------------------------------------------
/resources/views/partials/form/checkbox-toggle.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/database/factories/PersonFactory.php:
--------------------------------------------------------------------------------
1 | define(Person::class, function (Faker $faker) {
11 | return [
12 | 'external_id' => $faker->uuid,
13 | 'first_name' => $faker->firstName,
14 | 'last_name' => $faker->lastName,
15 | 'user_owner_id' => 1,
16 | ];
17 | });
18 |
--------------------------------------------------------------------------------
/docs/src/.vuepress/dist/assets/js/13.88e8e75e.js:
--------------------------------------------------------------------------------
1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[13],{181:function(t,s,i){"use strict";i.r(s);var a=i(0),n=Object(a.a)({},(function(){this._self._c;return this._m(0)}),[function(){var t=this._self._c;return t("div",{staticClass:"content"},[t("h1",{attrs:{id:"activity"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#activity"}},[this._v("#")]),this._v(" Activity")]),this._v(" "),t("p"),t("div",{staticClass:"table-of-contents"},[t("ul")]),t("p")])}],!1,null,null,null);s.default=n.exports}}]);
--------------------------------------------------------------------------------
/docs/src/.vuepress/dist/assets/js/20.5627bed4.js:
--------------------------------------------------------------------------------
1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[20],{188:function(t,s,i){"use strict";i.r(s);var n=i(0),e=Object(n.a)({},(function(){this._self._c;return this._m(0)}),[function(){var t=this._self._c;return t("div",{staticClass:"content"},[t("h1",{attrs:{id:"invoices"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#invoices"}},[this._v("#")]),this._v(" Invoices")]),this._v(" "),t("p"),t("div",{staticClass:"table-of-contents"},[t("ul")]),t("p")])}],!1,null,null,null);s.default=e.exports}}]);
--------------------------------------------------------------------------------
/docs/src/.vuepress/dist/assets/js/29.995c6a00.js:
--------------------------------------------------------------------------------
1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[29],{197:function(t,s,n){"use strict";n.r(s);var a=n(0),c=Object(a.a)({},(function(){this._self._c;return this._m(0)}),[function(){var t=this._self._c;return t("div",{staticClass:"content"},[t("h1",{attrs:{id:"products"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#products"}},[this._v("#")]),this._v(" Products")]),this._v(" "),t("p"),t("div",{staticClass:"table-of-contents"},[t("ul")]),t("p")])}],!1,null,null,null);s.default=c.exports}}]);
--------------------------------------------------------------------------------
/src/Models/UsageRequest.php:
--------------------------------------------------------------------------------
1 | hasMany(\VentureDrake\LaravelCrm\Models\Organisation::class);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/docs/src/.vuepress/dist/assets/js/27.cf5c84fa.js:
--------------------------------------------------------------------------------
1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[27],{195:function(t,s,i){"use strict";i.r(s);var a=i(0),n=Object(a.a)({},(function(){this._self._c;return this._m(0)}),[function(){var t=this._self._c;return t("div",{staticClass:"content"},[t("h1",{attrs:{id:"product-attributes"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#product-attributes"}},[this._v("#")]),this._v(" Product Attributes")]),this._v(" "),t("p"),t("div",{staticClass:"table-of-contents"},[t("ul")]),t("p")])}],!1,null,null,null);s.default=n.exports}}]);
--------------------------------------------------------------------------------
/docs/src/.vuepress/dist/assets/js/28.42e64a4d.js:
--------------------------------------------------------------------------------
1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[28],{196:function(t,s,e){"use strict";e.r(s);var a=e(0),i=Object(a.a)({},(function(){this._self._c;return this._m(0)}),[function(){var t=this._self._c;return t("div",{staticClass:"content"},[t("h1",{attrs:{id:"product-categories"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#product-categories"}},[this._v("#")]),this._v(" Product Categories")]),this._v(" "),t("p"),t("div",{staticClass:"table-of-contents"},[t("ul")]),t("p")])}],!1,null,null,null);s.default=i.exports}}]);
--------------------------------------------------------------------------------
/resources/views/partials/return-button.blade.php:
--------------------------------------------------------------------------------
1 | @if($model->searchValue(request()))
2 | {{ ucfirst(__('laravel-crm::lang.back_to_search_results')) }}
3 | @else
4 | {{ ucfirst(__('laravel-crm::lang.'.($text ?? 'back_to_'.$route))) }}
5 | @endif
--------------------------------------------------------------------------------
/docs/src/.vuepress/dist/assets/js/15.3b211ec5.js:
--------------------------------------------------------------------------------
1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[15],{183:function(t,s,i){"use strict";i.r(s);var n=i(0),e=Object(n.a)({},(function(){this._self._c;return this._m(0)}),[function(){var t=this._self._c;return t("div",{staticClass:"content"},[t("h1",{attrs:{id:"custom-field-groups"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#custom-field-groups"}},[this._v("#")]),this._v(" Custom Field Groups")]),this._v(" "),t("p"),t("div",{staticClass:"table-of-contents"},[t("ul")]),t("p")])}],!1,null,null,null);s.default=e.exports}}]);
--------------------------------------------------------------------------------
/docs/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "venturedrake/laravel-crm",
3 | "version": "0.17.0",
4 | "description": "A free open source CRM built as a package for laravel projects",
5 | "main": "index.js",
6 | "authors": {
7 | "name": "Andrew Drake",
8 | "email": "andrew@laravelcrm.com"
9 | },
10 | "repository": "https://github.com/venturedrake/laravel-crm",
11 | "scripts": {
12 | "dev": "vuepress dev src",
13 | "build": "vuepress build src"
14 | },
15 | "license": "MIT",
16 | "devDependencies": {
17 | "vuepress": "^0.14.11"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/resources/assets/site.webmanifest:
--------------------------------------------------------------------------------
1 | {
2 | "name": "",
3 | "short_name": "",
4 | "icons": [
5 | {
6 | "src": "/vendor/laravel-crm/android-chrome-192x192.png",
7 | "sizes": "192x192",
8 | "type": "image/png"
9 | },
10 | {
11 | "src": "/vendor/laravel-crm/android-chrome-384x384.png",
12 | "sizes": "384x384",
13 | "type": "image/png"
14 | }
15 | ],
16 | "theme_color": "#ffffff",
17 | "background_color": "#ffffff",
18 | "display": "standalone"
19 | }
20 |
--------------------------------------------------------------------------------
/src/Services/SettingService.php:
--------------------------------------------------------------------------------
1 | first();
12 | }
13 |
14 | public function set($name, $value, $label = null)
15 | {
16 | return Setting::updateOrCreate([
17 | 'name' => $name,
18 | ], [
19 | 'value' => $value,
20 | 'label' => $label,
21 | ]);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/config/package.php:
--------------------------------------------------------------------------------
1 | '1.2.2',
17 |
18 | ];
19 |
--------------------------------------------------------------------------------
/resources/views/partials/form/textarea.blade.php:
--------------------------------------------------------------------------------
1 |
2 | @isset($label)
@endisset
3 |
4 | @error($name)
5 |
{{ $message }}
6 | @enderror
7 |
--------------------------------------------------------------------------------
/resources/views/livewire/components/partials/file/actions.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
5 |
9 |
--------------------------------------------------------------------------------
/resources/views/livewire/components/partials/call/actions.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
5 |
9 |
10 |
--------------------------------------------------------------------------------
/resources/views/livewire/components/partials/lunch/actions.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
5 |
9 |
10 |
--------------------------------------------------------------------------------
/resources/views/livewire/components/partials/meeting/actions.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
5 |
9 |
10 |
--------------------------------------------------------------------------------
/src/Models/ContactType.php:
--------------------------------------------------------------------------------
1 | belongsToMany(Contact::class);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/Http/Middleware/Authenticate.php:
--------------------------------------------------------------------------------
1 | expectsJson()) {
18 | return route('login');
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/Models/TaxRate.php:
--------------------------------------------------------------------------------
1 | hasMany(\VentureDrake\LaravelCrm\Models\Product::class);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/database/factories/ProductFactory.php:
--------------------------------------------------------------------------------
1 | define(Product::class, function (Faker $faker) {
12 | return [
13 | 'external_id' => $faker->uuid,
14 | 'name' => $faker->word,
15 | 'product_category_id' => ProductCategory::all()->random(1)->first()->id,
16 | 'user_owner_id' => 1,
17 | ];
18 | });
19 |
--------------------------------------------------------------------------------
/docs/src/reference/custom-fields.md:
--------------------------------------------------------------------------------
1 | # Custom Fields
2 |
3 | [[toc]]
4 |
5 | ## Overview
6 |
7 | Custom fields can be associated to Eloquent models to allow custom data to be stored. You can use these fields to store any additional custom data you would like to collect in your CRM without needing to add fields to the core tables.
8 |
9 | ## Fields
10 |
11 | ```php
12 | VentureDrake\LaravelCrm\Models\Field
13 | ```
14 |
15 | |Field|Description|
16 | |:-|:-|
17 | |`type`|Field type|
18 | |`name`|Field name|
19 | |`label`|Field label|
20 | |`required`|Boolean|
21 | |`default`||
22 | |`validation`||
23 |
24 | ## Field Groups
--------------------------------------------------------------------------------
/src/Models/FieldGroup.php:
--------------------------------------------------------------------------------
1 | hasMany(\VentureDrake\LaravelCrm\Models\Field::class);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/Models/FieldModel.php:
--------------------------------------------------------------------------------
1 | belongsTo(\VentureDrake\LaravelCrm\Models\Field::class);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/Models/AddressType.php:
--------------------------------------------------------------------------------
1 | hasMany(\VentureDrake\LaravelCrm\Models\Address::class);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/Models/FieldOption.php:
--------------------------------------------------------------------------------
1 | belongsTo(\VentureDrake\LaravelCrm\Models\Field::class);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/Models/LeadSource.php:
--------------------------------------------------------------------------------
1 | hasMany(\VentureDrake\LaravelCrm\Models\Lead::class, 'lead_source_id');
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/Models/LeadStatus.php:
--------------------------------------------------------------------------------
1 | hasMany(\VentureDrake\LaravelCrm\Models\Lead::class, 'lead_status_id');
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/resources/lang/en/pagination.php:
--------------------------------------------------------------------------------
1 | '« Previous',
17 | 'next' => 'Next »',
18 |
19 | ];
20 |
--------------------------------------------------------------------------------
/resources/views/product-categories/partials/fields.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | @include('laravel-crm::partials.form.text',[
4 | 'name' => 'name',
5 | 'label' => ucfirst(trans('laravel-crm::lang.name')),
6 | 'value' => old('name', $productCategory->name ?? null)
7 | ])
8 |
9 | @include('laravel-crm::partials.form.textarea',[
10 | 'name' => 'description',
11 | 'label' => ucfirst(trans('laravel-crm::lang.description')),
12 | 'rows' => 5,
13 | 'value' => old('name', $productCategory->description ?? null)
14 | ])
15 |
16 |
--------------------------------------------------------------------------------
/src/Http/Helpers/PersonName.php:
--------------------------------------------------------------------------------
1 | $firstname,
13 | 'last_name' => $lastname,
14 | ];
15 | }
16 |
17 | function firstNameFromName($name)
18 | {
19 | $nameArray = \VentureDrake\LaravelCrm\Http\Helpers\PersonName\firstLastFromName($name);
20 |
21 | if ($nameArray['first_name']) {
22 | return $nameArray['first_name'];
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/resources/views/partials/view-types.blade.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/views/livewire/kanban-board/board.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | @foreach($stages as $stage)
5 | @include('laravel-crm::livewire.kanban-board.stage', [
6 | 'stage' => $stage
7 | ])
8 | @endforeach
9 |
10 |
11 |
12 |
13 | @includeWhen($sortable, 'laravel-crm::livewire.kanban-board.sortable', [
14 | 'sortable' => $sortable,
15 | 'sortableBetweenStages' => $sortableBetweenStages,
16 | ])
17 |
18 |
19 |
--------------------------------------------------------------------------------
/resources/views/layouts/partials/favicon.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/resources/views/livewire/components/partials/task/actions.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
5 |
10 |
--------------------------------------------------------------------------------
/src/Models/PipelineStageProbability.php:
--------------------------------------------------------------------------------
1 | hasMany(\VentureDrake\LaravelCrm\Models\PipelineStage::class);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/Http/Requests/StoreDeliveryRequest.php:
--------------------------------------------------------------------------------
1 | invoice_id }} for {{ money($invoice->total, $invoice->currency) }}.
4 |
5 | The amount outstanding of {{ money($invoice->total, $invoice->currency) }} is due on {{ $invoice->due_date->format('d M Y') }}.
6 |
7 | View and pay your invoice online: [Online Invoice Link]
8 |
9 | From your online invoice you can print a PDF version.
10 |
11 | If you have any questions, please let us know.
12 |
13 | Thanks,
14 | {{ \VentureDrake\LaravelCrm\Models\Setting::where('name', 'organisation_name')->first()->value }}
15 | @if($invoice->terms)
16 |
17 | Terms
18 | {{ $invoice->terms }}
19 | @endif
--------------------------------------------------------------------------------
/src/Models/XeroItem.php:
--------------------------------------------------------------------------------
1 | belongsTo(\VentureDrake\LaravelCrm\Models\Product::class);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/Models/XeroPerson.php:
--------------------------------------------------------------------------------
1 | belongsTo(\VentureDrake\LaravelCrm\Models\Person::class);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/Http/Requests/StoreClientRequest.php:
--------------------------------------------------------------------------------
1 | 'required|max:255',
28 | ];
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/Http/Requests/StorePipelineRequest.php:
--------------------------------------------------------------------------------
1 | 'required|max:255',
28 | ];
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/Http/Requests/StoreProductRequest.php:
--------------------------------------------------------------------------------
1 | 'required|max:255',
28 | ];
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/Http/Requests/StoreRoleRequest.php:
--------------------------------------------------------------------------------
1 | 'required|string|max:255',
28 | ];
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/Http/Requests/StoreTeamRequest.php:
--------------------------------------------------------------------------------
1 | 'required|string|max:255',
28 | ];
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/Http/Requests/UpdateClientRequest.php:
--------------------------------------------------------------------------------
1 | 'required|max:255',
28 | ];
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/Http/Requests/UpdateProductRequest.php:
--------------------------------------------------------------------------------
1 | 'required|max:255',
28 | ];
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/LaravelCrmEventServiceProvider.php:
--------------------------------------------------------------------------------
1 | [
13 | NewAuthDevice::class,
14 | ],
15 | ];
16 |
17 | /**
18 | * Register any events for your application.
19 | *
20 | * @return void
21 | */
22 | public function boot()
23 | {
24 | parent::boot();
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Models/XeroInvoice.php:
--------------------------------------------------------------------------------
1 | belongsTo(\VentureDrake\LaravelCrm\Models\Invoice::class);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/Http/Requests/StoreFieldGroupRequest.php:
--------------------------------------------------------------------------------
1 | 'required|max:255',
28 | ];
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/Http/Requests/UpdatePipelineRequest.php:
--------------------------------------------------------------------------------
1 | 'required|max:255',
28 | ];
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/Http/Requests/UpdateRoleRequest.php:
--------------------------------------------------------------------------------
1 | 'required|string|max:255',
28 | ];
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/Http/Requests/UpdateTeamRequest.php:
--------------------------------------------------------------------------------
1 | 'required|string|max:255',
28 | ];
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/resources/lang/en/auth.php:
--------------------------------------------------------------------------------
1 | 'These credentials do not match our records.',
17 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
18 |
19 | ];
20 |
--------------------------------------------------------------------------------
/resources/views/mail/email.blade.php:
--------------------------------------------------------------------------------
1 | @component('mail::layout')
2 | {{-- Header --}}
3 | @slot('header')
4 | @component('mail::header', ['url' => config('app.url')]){{ config('app.name') }}@endcomponent
5 | @endslot
6 |
7 | {{-- Body --}}
8 | {!! $content ?? null !!}
9 |
10 | {{-- Subcopy --}}
11 | @isset($subcopy)
12 | @slot('subcopy')
13 | @component('mail::subcopy')
14 | {!! $subcopy !!}
15 | @endcomponent
16 | @endslot
17 | @endisset
18 |
19 | {{-- Footer --}}
20 | @slot('footer')
21 | @component('mail::footer')
22 | Powered by Laravel CRM
23 | © {{ date('Y') }} {{ config('app.name') }}. @lang('All rights reserved.')
24 | @endcomponent
25 | @endslot
26 | @endcomponent
27 |
--------------------------------------------------------------------------------
/src/Http/Requests/UpdateFieldGroupRequest.php:
--------------------------------------------------------------------------------
1 | 'required|max:255',
28 | ];
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/Models/ProductCategory.php:
--------------------------------------------------------------------------------
1 | hasMany(\VentureDrake\LaravelCrm\Models\Product::class);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Http/Middleware/RouteSubdomain.php:
--------------------------------------------------------------------------------
1 | getHost());
19 |
20 | if(count($host) == 2) {
21 | abort(404);
22 | } elseif($host[0] != config('laravel-crm.route_subdomain')) {
23 | abort(404);
24 | }
25 |
26 | return $next($request);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/Http/Requests/StoreProductCategoryRequest.php:
--------------------------------------------------------------------------------
1 | 'required|max:255',
28 | ];
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/Models/ProductAttribute.php:
--------------------------------------------------------------------------------
1 | hasMany(\VentureDrake\LaravelCrm\Models\Product::class);
25 | }*/
26 | }
27 |
--------------------------------------------------------------------------------
/src/Models/XeroContact.php:
--------------------------------------------------------------------------------
1 | belongsTo(\VentureDrake\LaravelCrm\Models\Organisation::class);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/Http/Requests/UpdateProductCategoryRequest.php:
--------------------------------------------------------------------------------
1 | 'required|max:255',
28 | ];
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/resources/views/partials/form/file.blade.php:
--------------------------------------------------------------------------------
1 |
2 | @isset($label)
@endisset
3 |
4 |
5 |
6 |
7 | @error($name)
8 |
{{ $message }}
9 | @enderror
10 |
--------------------------------------------------------------------------------
/src/Models/XeroPurchaseOrder.php:
--------------------------------------------------------------------------------
1 | belongsTo(\VentureDrake\LaravelCrm\Models\PurchaseOrder::class);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/Http/Middleware/FormComponentsConfig.php:
--------------------------------------------------------------------------------
1 | 'bootstrap-4']);
20 |
21 | return $next($request);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/Http/Requests/StoreFieldRequest.php:
--------------------------------------------------------------------------------
1 | 'required',
28 | 'name' => 'required|max:255',
29 | ];
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/Http/Requests/UpdateFieldRequest.php:
--------------------------------------------------------------------------------
1 | 'required',
28 | 'name' => 'required|max:255',
29 | ];
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/Http/Requests/StoreTaxRateRequest.php:
--------------------------------------------------------------------------------
1 | 'required|max:255',
28 | 'rate' => 'required',
29 | ];
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/Http/Requests/UpdateTaxRateRequest.php:
--------------------------------------------------------------------------------
1 | 'required|max:255',
28 | 'rate' => 'required',
29 | ];
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/Http/Requests/InviteUserRequest.php:
--------------------------------------------------------------------------------
1 | 'required|max:255',
28 | 'subject' => 'required|max:255',
29 | ];
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/Http/Requests/StorePipelineStageRequest.php:
--------------------------------------------------------------------------------
1 | 'required|max:255',
28 | 'pipeline_id' => 'required',
29 | ];
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/Http/Requests/UpdatePipelineStageRequest.php:
--------------------------------------------------------------------------------
1 | 'required|max:255',
28 | 'pipeline_id' => 'required',
29 | ];
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/Models/Field.php:
--------------------------------------------------------------------------------
1 | belongsTo(\VentureDrake\LaravelCrm\Models\FieldGroup::class);
23 | }
24 |
25 | public function fieldOptions()
26 | {
27 | return $this->hasMany(\VentureDrake\LaravelCrm\Models\FieldOption::class);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/Models/Activity.php:
--------------------------------------------------------------------------------
1 | morphTo();
23 | }
24 |
25 | public function timelineable()
26 | {
27 | return $this->morphTo();
28 | }
29 |
30 | public function recordable()
31 | {
32 | return $this->morphTo();
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/Http/Middleware/TeamsPermission.php:
--------------------------------------------------------------------------------
1 | guest()) {
19 | return $next($request);
20 | }
21 |
22 | if (config('laravel-crm.teams') && auth()->user()->currentTeam) {
23 | app(\Spatie\Permission\PermissionRegistrar::class)->setPermissionsTeamId(auth()->user()->currentTeam->id);
24 | }
25 |
26 | return $next($request);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/Models/DeliveryProduct.php:
--------------------------------------------------------------------------------
1 | belongsTo(\VentureDrake\LaravelCrm\Models\Delivery::class);
23 | }
24 |
25 | public function orderProduct()
26 | {
27 | return $this->belongsTo(\VentureDrake\LaravelCrm\Models\OrderProduct::class);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/Models/ProductVariation.php:
--------------------------------------------------------------------------------
1 | belongsTo(\VentureDrake\LaravelCrm\Models\Product::class);
23 | }
24 |
25 | public function productPrices()
26 | {
27 | return $this->hasMany(\VentureDrake\LaravelCrm\Models\ProductPrice::class);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/Models/Industry.php:
--------------------------------------------------------------------------------
1 | belongsToMany(Organisation::class);
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/Http/Requests/UpdateUserRequest.php:
--------------------------------------------------------------------------------
1 | 'required|string|max:255',
28 | 'email' => 'required|string|email|max:255|unique:users,email,'.$this->user->id,
29 | ];
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/Models/FieldValue.php:
--------------------------------------------------------------------------------
1 | belongsTo(\VentureDrake\LaravelCrm\Models\Field::class);
23 | }
24 |
25 | /**
26 | * Get all of the owning field value models.
27 | */
28 | public function fieldValueable()
29 | {
30 | return $this->morphTo();
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/Models/Email.php:
--------------------------------------------------------------------------------
1 | morphTo();
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/Models/OrganisationType.php:
--------------------------------------------------------------------------------
1 | belongsToMany(Organisation::class);
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/Models/Phone.php:
--------------------------------------------------------------------------------
1 | morphTo();
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/Traits/BelongsToTeams.php:
--------------------------------------------------------------------------------
1 | hasUser() && auth()->user()->currentTeam && ! $model->team_id) {
24 | $model->team_id = auth()->user()->currentTeam->id ?? null;
25 | }
26 | });
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/resources/views/activities/index.blade.php:
--------------------------------------------------------------------------------
1 | @extends('laravel-crm::layouts.app')
2 |
3 | @section('content')
4 |
5 |
6 |
9 |
10 | @if($activities && $activities->count() > 0)
11 | @foreach($activities as $activity)
12 | @include('laravel-crm::activities.partials.activity', $activity)
13 | @endforeach
14 | @endif
15 |
16 | @if($activities instanceof \Illuminate\Pagination\LengthAwarePaginator )
17 |
20 | @endif
21 |
22 |
23 | @endsection
--------------------------------------------------------------------------------
/src/Traits/HasCrmUserRelations.php:
--------------------------------------------------------------------------------
1 | belongsTo(\App\User::class, 'user_created_id');
10 | }
11 |
12 | public function updatedByUser()
13 | {
14 | return $this->belongsTo(\App\User::class, 'user_updated_id');
15 | }
16 |
17 | public function deletedByUser()
18 | {
19 | return $this->belongsTo(\App\User::class, 'user_deleted_id');
20 | }
21 |
22 | public function restoredByUser()
23 | {
24 | return $this->belongsTo(\App\User::class, 'user_restored_id');
25 | }
26 |
27 | public function ownerUser()
28 | {
29 | return $this->belongsTo(\App\User::class, 'user_owner_id');
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/Http/Requests/StoreUserRequest.php:
--------------------------------------------------------------------------------
1 | 'required|string|max:255',
28 | 'email' => 'required|string|email|max:255|unique:users,email',
29 | 'password' => 'required|string|min:8|confirmed',
30 | ];
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/resources/lang/en/passwords.php:
--------------------------------------------------------------------------------
1 | 'Your password has been reset!',
17 | 'sent' => 'We have e-mailed your password reset link!',
18 | 'throttled' => 'Please wait before retrying.',
19 | 'token' => 'This password reset token is invalid.',
20 | 'user' => "We can't find a user with that e-mail address.",
21 |
22 | ];
23 |
--------------------------------------------------------------------------------
/resources/views/livewire/components/partials/note/actions.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
5 |
14 |
--------------------------------------------------------------------------------
/resources/views/livewire/components/partials/note/content.blade.php:
--------------------------------------------------------------------------------
1 | @if($editMode)
2 |
9 | @else
10 | {!! $note->content !!}
11 | @if($note->noted_at)
12 |
13 | {{ ucfirst(__('laravel-crm::lang.noted_at')) }} {{ $note->noted_at->format('h:i A') }} on {{ $note->noted_at->toFormattedDateString() }}
14 | @endif
15 | @endif
16 |
--------------------------------------------------------------------------------
/src/Traits/NotifyToast.php:
--------------------------------------------------------------------------------
1 | flash('notify.message', $message);
18 | session()->flash('notify.level', $level);
19 |
20 | return redirect()->route($route, $routeParams);
21 | }
22 |
23 | $this->dispatchBrowserEvent('notifyToast', [
24 | 'message' => $message,
25 | 'level' => $level,
26 | ]);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/database/migrations/add_team_id_to_xero_tokens_table.php.stub:
--------------------------------------------------------------------------------
1 | unsignedBigInteger('team_id')->after('id')->nullable();
18 | });
19 | }
20 |
21 | /**
22 | * Reverse the migrations.
23 | *
24 | * @return void
25 | */
26 | public function down()
27 | {
28 | Schema::table('xero_tokens', function (Blueprint $table) {
29 | $table->dropColumn(['team_id']);
30 | });
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/resources/views/livewire/kanban-board/record.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
{{ $record['title'] }}
4 | @include('laravel-crm::partials.labels',[
5 | 'labels' => $record['labels'],
6 | 'limit' => 3
7 | ])
8 |
11 |
12 | @if($record['amount'])
13 | {{ money($record['amount'], $record['currency']) }}
14 | @endif
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/resources/views/teams/partials/fields.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | @include('laravel-crm::partials.form.text',[
4 | 'name' => 'name',
5 | 'label' => ucfirst(__('laravel-crm::lang.name')),
6 | 'value' => old('name', $team->name ?? null),
7 | 'required' => 'true'
8 | ])
9 |
10 |
11 |
{{ ucfirst(__('laravel-crm::lang.users')) }}
12 | @include('laravel-crm::partials.form.multiselect',[
13 | 'name' => 'team_users',
14 | 'label' => null,
15 | 'options' => \VentureDrake\LaravelCrm\Http\Helpers\SelectOptions\optionsFromModel($users, null),
16 | 'value' => old('users', (isset($team)) ? $team->users()->orderBy('name','ASC')->get()->pluck('id')->toArray() : null)
17 | ])
18 |
19 |
--------------------------------------------------------------------------------
/resources/lang/en_gb/lang.php:
--------------------------------------------------------------------------------
1 | 'organisation',
5 | 'organizations' => 'organisations',
6 | 'create_organization' => 'create organisation',
7 | 'edit_organization' => 'edit organisation',
8 | 'add_organization' => 'add organisation',
9 | 'organization_stored' => 'organisation stored',
10 | 'organization_updated' => 'organisation updated',
11 | 'organization_deleted' => 'organisation deleted',
12 | 'back_to_organizations' => 'back to organisations',
13 | 'total_organizations' => 'total organisations',
14 | 'organization_name' => 'organisation name',
15 | 'related_organizations' => 'related organisations',
16 | 'link_an_organization' => 'link an organisation',
17 | 'link_organization' => 'link organisation',
18 | 'postcode' => 'postcode',
19 | 'back_to_organisations' => 'back to organisations',
20 | ];
21 |
--------------------------------------------------------------------------------
/resources/views/livewire/components/partials/task/content.blade.php:
--------------------------------------------------------------------------------
1 | @if($editMode)
2 |
9 | @else
10 | {!! $task->description !!}
11 | @if($task->due_at)
12 |
13 | @include('laravel-crm::livewire.components.partials.task.status') {{ ucfirst(__('laravel-crm::lang.due')) }} {{ $task->due_at->format('h:i A') }} on {{ $task->due_at->toFormattedDateString() }}
14 | @endif
15 | @endif
16 |
--------------------------------------------------------------------------------
/resources/views/calls/index.blade.php:
--------------------------------------------------------------------------------
1 | @extends('laravel-crm::layouts.app')
2 |
3 | @section('content')
4 |
5 |
6 |
9 |
10 |
{{ ucfirst(__('laravel-crm::lang.calls')) }}
11 | @if($calls && $calls->count() > 0)
12 | @foreach($calls as $call)
13 | @livewire('call',[
14 | 'call' => $call
15 | ], key($call->id))
16 | @endforeach
17 | @endif
18 |
19 | @if($calls instanceof \Illuminate\Pagination\LengthAwarePaginator )
20 |
23 | @endif
24 |
25 |
26 | @endsection
--------------------------------------------------------------------------------
/resources/views/files/index.blade.php:
--------------------------------------------------------------------------------
1 | @extends('laravel-crm::layouts.app')
2 |
3 | @section('content')
4 |
5 |
6 |
9 |
10 |
{{ ucfirst(__('laravel-crm::lang.files')) }}
11 | @if($files && $files->count() > 0)
12 | @foreach($files as $file)
13 | @livewire('file',[
14 | 'file' => $file
15 | ], key($file->id))
16 | @endforeach
17 | @endif
18 |
19 | @if($files instanceof \Illuminate\Pagination\LengthAwarePaginator )
20 |
23 | @endif
24 |
25 |
26 | @endsection
--------------------------------------------------------------------------------
/resources/views/partials/form/password.blade.php:
--------------------------------------------------------------------------------
1 |
2 | @isset($label)
@endisset
3 | @isset($prepend)
4 |
12 | @endisset
13 | @error($name)
14 |
{{ $message }}
15 | @enderror
16 |
--------------------------------------------------------------------------------
/database/migrations/create_logins_table.php.stub:
--------------------------------------------------------------------------------
1 | bigIncrements('id');
13 | $table->ipAddress('ip_address');
14 | $table->string('type')->default(\Lab404\AuthChecker\Models\Login::TYPE_LOGIN);
15 | $table->bigInteger('user_id')->unsigned();
16 | $table->bigInteger('device_id')->unsigned()->index()->nullable();
17 | $table->timestamps();
18 |
19 | // $table->index(['user_id', 'user_type']);
20 | });
21 | }
22 |
23 | public function down()
24 | {
25 | Schema::dropIfExists('logins');
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/database/migrations/add_deleted_at_to_laravel_crm_activities_table.php.stub:
--------------------------------------------------------------------------------
1 | softDeletes();
18 | });
19 | }
20 |
21 | /**
22 | * Reverse the migrations.
23 | *
24 | * @return void
25 | */
26 | public function down()
27 | {
28 | Schema::table(config('laravel-crm.db_table_prefix').'activities', function (Blueprint $table) {
29 | $table->dropSoftDeletes();
30 | });
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/docs/src/.vuepress/dist/assets/js/7.91ff4475.js:
--------------------------------------------------------------------------------
1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[7],{175:function(t,a,s){"use strict";s.r(a);var r=s(0),e=Object(r.a)({},(function(){this._self._c;return this._m(0)}),[function(){var t=this,a=t._self._c;return a("div",{staticClass:"content"},[a("h1",{attrs:{id:"config"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#config"}},[t._v("#")]),t._v(" Config")]),t._v(" "),a("h2",{attrs:{id:"foo"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#foo"}},[t._v("#")]),t._v(" foo")]),t._v(" "),a("ul",[a("li",[t._v("Type: "),a("code",[t._v("string")])]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("/")])])]),t._v(" "),a("h2",{attrs:{id:"bar"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#bar"}},[t._v("#")]),t._v(" bar")]),t._v(" "),a("ul",[a("li",[t._v("Type: "),a("code",[t._v("string")])]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("/")])])])])}],!1,null,null,null);a.default=e.exports}}]);
--------------------------------------------------------------------------------
/src/Http/Requests/StoreLabelRequest.php:
--------------------------------------------------------------------------------
1 | 'required|max:255',
28 | 'hex' => 'required|max:7',
29 | ];
30 | }
31 |
32 | public function messages()
33 | {
34 | return [
35 | 'hex.required' => 'The '.trans('laravel-crm::lang.color').' is required.',
36 | ];
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/Http/Requests/UpdateLabelRequest.php:
--------------------------------------------------------------------------------
1 | 'required|max:255',
28 | 'hex' => 'required|max:7',
29 | ];
30 | }
31 |
32 | public function messages()
33 | {
34 | return [
35 | 'hex.required' => 'The '.trans('laravel-crm::lang.color').' is required.',
36 | ];
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/database/migrations/add_mime_to_laravel_crm_files_table.php.stub:
--------------------------------------------------------------------------------
1 | string('mime')->after('filesize')->nullable();
18 | });
19 | }
20 |
21 | /**
22 | * Reverse the migrations.
23 | *
24 | * @return void
25 | */
26 | public function down()
27 | {
28 | Schema::table(config('laravel-crm.db_table_prefix').'files', function (Blueprint $table) {
29 | $table->dropColumn(['mime']);
30 | });
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/database/migrations/alter_type_on_laravel_crm_phones_table.php.stub:
--------------------------------------------------------------------------------
1 | 'organisation',
5 | 'organizations' => 'organisations',
6 | 'create_organization' => 'create organisation',
7 | 'edit_organization' => 'edit organisation',
8 | 'add_organization' => 'add organisation',
9 | 'organization_stored' => 'organisation stored',
10 | 'organization_updated' => 'organisation updated',
11 | 'organization_deleted' => 'organisation deleted',
12 | 'back_to_organizations' => 'back to organisations',
13 | 'total_organizations' => 'total organisations',
14 | 'organization_name' => 'organisation name',
15 | 'related_organizations' => 'related organisations',
16 | 'link_an_organization' => 'link an organisation',
17 | 'link_organization' => 'link organisation',
18 | 'postcode' => 'postcode',
19 | 'back_to_organisations' => 'back to organisations',
20 | 'vat_number' => 'ABN Number'
21 | ];
22 |
--------------------------------------------------------------------------------
/resources/views/lunches/index.blade.php:
--------------------------------------------------------------------------------
1 | @extends('laravel-crm::layouts.app')
2 |
3 | @section('content')
4 |
5 |
6 |
9 |
10 |
{{ ucfirst(__('laravel-crm::lang.lunches')) }}
11 | @if($lunches && $lunches->count() > 0)
12 | @foreach($lunches as $lunch)
13 | @livewire('lunch',[
14 | 'lunch' => $lunch
15 | ], key($lunch->id))
16 | @endforeach
17 | @endif
18 |
19 | @if($lunches instanceof \Illuminate\Pagination\LengthAwarePaginator )
20 |
23 | @endif
24 |
25 |
26 | @endsection
--------------------------------------------------------------------------------
/database/migrations/add_soft_delete_to_laravel_crm_field_values_table.php.stub:
--------------------------------------------------------------------------------
1 | softDeletes();
18 | });
19 | }
20 |
21 | /**
22 | * Reverse the migrations.
23 | *
24 | * @return void
25 | */
26 | public function down()
27 | {
28 | Schema::table(config('laravel-crm.db_table_prefix').'field_values', function (Blueprint $table) {
29 | $table->dropSoftDeletes();
30 | });
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/Http/Controllers/Jetstream/CurrentTeamController.php:
--------------------------------------------------------------------------------
1 | findOrFail($request->team_id);
20 |
21 | if ($request->user()->switchTeam($team)) {
22 | app()[\Spatie\Permission\PermissionRegistrar::class]->forgetCachedPermissions();
23 | } else {
24 | abort(403);
25 | }
26 |
27 | return redirect(config('fortify.home'), 303);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/docs/src/.vuepress/dist/assets/js/36.a688bbcd.js:
--------------------------------------------------------------------------------
1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[36],{204:function(t,e,s){"use strict";s.r(e);var i=s(0),a=Object(i.a)({},(function(){var t=this._self._c;return t("div",{staticClass:"content"},[this._m(0),this._v(" "),t("p",[this._v("Use the Laravel CRM with a complete user interface you can use instantly.")]),this._v(" "),this._m(1),this._v(" "),t("p",[this._v("Once installed, just head to http://"),t("yoursite",[this._v("/crm and you should see the login screen.")])],1)])}),[function(){var t=this._self._c;return t("h1",{attrs:{id:"overview"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#overview"}},[this._v("#")]),this._v(" Overview")])},function(){var t=this._self._c;return t("h2",{attrs:{id:"accessing-the-user-interface"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#accessing-the-user-interface"}},[this._v("#")]),this._v(" Accessing the user interface")])}],!1,null,null,null);e.default=a.exports}}]);
--------------------------------------------------------------------------------
/database/factories/DealFactory.php:
--------------------------------------------------------------------------------
1 | define(Deal::class, function (Faker $faker) {
14 | return [
15 | 'external_id' => $faker->uuid,
16 | 'person_id' => Person::all()->random(1)->first()->id,
17 | 'organisation_id' => Organisation::all()->random(1)->first()->id,
18 | 'title' => $faker->sentence,
19 | 'amount' => $faker->randomFloat(2, 100, 100000),
20 | 'currency' => 'USD',
21 | 'user_owner_id' => 1,
22 | 'user_assigned_id' => 1,
23 | 'created_at' => Carbon::now()->subDays($faker->numberBetween(0, 14)),
24 | ];
25 | });
26 |
--------------------------------------------------------------------------------
/database/factories/LeadFactory.php:
--------------------------------------------------------------------------------
1 | define(Lead::class, function (Faker $faker) {
14 | return [
15 | 'external_id' => $faker->uuid,
16 | 'person_id' => Person::all()->random(1)->first()->id,
17 | 'organisation_id' => Organisation::all()->random(1)->first()->id,
18 | 'title' => $faker->sentence,
19 | 'amount' => $faker->randomFloat(2, 100, 100000),
20 | 'currency' => 'USD',
21 | 'lead_status_id' => 1,
22 | 'user_assigned_id' => 1,
23 | 'created_at' => Carbon::now()->subDays($faker->numberBetween(0, 14)),
24 | ];
25 | });
26 |
--------------------------------------------------------------------------------
/src/Http/Livewire/LiveActivityMenu.php:
--------------------------------------------------------------------------------
1 | emit('addNoteActivity');
12 | }
13 |
14 | public function addTask()
15 | {
16 | $this->emit('addTaskActivity');
17 | }
18 |
19 | public function addCall()
20 | {
21 | $this->emit('addCallActivity');
22 | }
23 |
24 | public function addMeeting()
25 | {
26 | $this->emit('addMeetingActivity');
27 | }
28 |
29 | public function addLunch()
30 | {
31 | $this->emit('addLunchActivity');
32 | }
33 |
34 | public function addFile()
35 | {
36 | $this->emit('addFileActivity');
37 | }
38 |
39 | public function render()
40 | {
41 | return view('laravel-crm::livewire.activity-menu');
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/src/Models/Contact.php:
--------------------------------------------------------------------------------
1 | belongsToMany(ContactType::class);
23 | }
24 |
25 | /**
26 | * Get all of the owning contactable models.
27 | */
28 | public function contactable()
29 | {
30 | return $this->morphTo();
31 | }
32 |
33 | /**
34 | * Get all of the owning entityable models.
35 | */
36 | public function entityable()
37 | {
38 | return $this->morphTo();
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/resources/views/meetings/index.blade.php:
--------------------------------------------------------------------------------
1 | @extends('laravel-crm::layouts.app')
2 |
3 | @section('content')
4 |
5 |
6 |
9 |
10 |
{{ ucfirst(__('laravel-crm::lang.meetings')) }}
11 | @if($meetings && $meetings->count() > 0)
12 | @foreach($meetings as $meeting)
13 | @livewire('meeting',[
14 | 'meeting' => $meeting
15 | ], key($meeting->id))
16 | @endforeach
17 | @endif
18 |
19 | @if($meetings instanceof \Illuminate\Pagination\LengthAwarePaginator )
20 |
23 | @endif
24 |
25 |
26 | @endsection
--------------------------------------------------------------------------------
/database/migrations/add_global_to_laravel_crm_settings_table.php.stub:
--------------------------------------------------------------------------------
1 | boolean('global')->after('team_id')->default(false);
18 | });
19 | }
20 |
21 | /**
22 | * Reverse the migrations.
23 | *
24 | * @return void
25 | */
26 | public function down()
27 | {
28 | Schema::table(config('laravel-crm.db_table_prefix').'settings', function (Blueprint $table) {
29 | $table->dropColumn(['global']);
30 | });
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/database/migrations/alter_value_on_laravel_crm_field_values_table.php.stub:
--------------------------------------------------------------------------------
1 | text('value')->nullable()->change();
18 | });
19 | }
20 |
21 | /**
22 | * Reverse the migrations.
23 | *
24 | * @return void
25 | */
26 | public function down()
27 | {
28 | Schema::table(config('laravel-crm.db_table_prefix').'field_values', function (Blueprint $table) {
29 | $table->text('value')->change();
30 | });
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/database/migrations/alter_url_on_laravel_crm_usage_requests_table.php.stub:
--------------------------------------------------------------------------------
1 | string('url', 2048)->change();
18 | });
19 | }
20 |
21 | /**
22 | * Reverse the migrations.
23 | *
24 | * @return void
25 | */
26 | public function down()
27 | {
28 | Schema::table(config('laravel-crm.db_table_prefix').'usage_requests', function (Blueprint $table) {
29 | $table->string('url', 255)->change();
30 | });
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/Http/Requests/UpdateSettingRequest.php:
--------------------------------------------------------------------------------
1 | 'required|max:255',
28 | 'country' => 'required',
29 | 'language' => 'required',
30 | 'currency' => 'required',
31 | 'timezone' => 'required',
32 | 'date_format' => 'required',
33 | 'time_format' => 'required'
34 | ];
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/database/seeders/LaravelCrmSampleDataSeeder.php:
--------------------------------------------------------------------------------
1 | create();
23 | factory(Person::class, 200)->create();
24 | factory(Lead::class, 100)->create();
25 | factory(Deal::class, 50)->create();
26 | factory(Product::class, 10)->create();
27 | factory(ProductCategory::class, 5)->create();
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/resources/sass/app.scss:
--------------------------------------------------------------------------------
1 | // Fonts
2 | @import url('https://fonts.googleapis.com/css?family=Nunito');
3 |
4 | // Variables
5 | @import 'variables';
6 |
7 | // Bootstrap
8 | @import '~bootstrap/scss/bootstrap';
9 |
10 | // bootstrap4-toggle
11 | @import '~bootstrap4-toggle/css/bootstrap4-toggle.min.css';
12 |
13 | // jquery-datetimepicker
14 | @import '~jquery-datetimepicker/build/jquery.datetimepicker.min.css';
15 |
16 | // bootstrap-duallistbox
17 | @import '../../bower_components/bootstrap-duallistbox/dist/bootstrap-duallistbox.min.css';
18 |
19 | // Select2
20 | @import '~select2/dist/css/select2.min.css';
21 |
22 | // Bootstrap color picker
23 | @import '~bootstrap-colorpicker/dist/css/bootstrap-colorpicker.min.css';
24 |
25 | // Bootstrap bootstrap-multiselect
26 | @import '~bootstrap-multiselect/dist/css/bootstrap-multiselect.min.css';
27 |
28 | // Trix
29 | @import "~trix/dist/trix.css";
30 |
31 | // Custom
32 | @import "custom";
33 |
34 | // Portal
35 | @import "portal";
--------------------------------------------------------------------------------
/database/migrations/add_team_id_to_laravel_crm_usage_requests_table.php.stub:
--------------------------------------------------------------------------------
1 | unsignedBigInteger('team_id')->after('id')->nullable();
18 | });
19 | }
20 |
21 | /**
22 | * Reverse the migrations.
23 | *
24 | * @return void
25 | */
26 | public function down()
27 | {
28 | Schema::table(config('laravel-crm.db_table_prefix').'usage_requests', function (Blueprint $table) {
29 | $table->dropColumn(['team_id']);
30 | });
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/resources/views/layouts/partials/nav-user.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{ Auth::user()->name }}
4 |
5 |
6 |
20 |
--------------------------------------------------------------------------------
/database/migrations/add_noted_at_to_laravel_crm_notes_table.php.stub:
--------------------------------------------------------------------------------
1 | datetime('noted_at')->after('pinned')->nullable();
18 | });
19 | }
20 |
21 | /**
22 | * Reverse the migrations.
23 | *
24 | * @return void
25 | */
26 | public function down()
27 | {
28 | Schema::table(config('laravel-crm.db_table_prefix').'notes', function (Blueprint $table) {
29 | $table->dropColumn([
30 | 'noted_at',
31 | ]);
32 | });
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/database/migrations/create_laravel_crm_timezones_table.php.stub:
--------------------------------------------------------------------------------
1 | id();
18 | $table->string('name');
19 | $table->string('offset');
20 | $table->string('diff_from_gtm');
21 | $table->timestamps();
22 | });
23 | }
24 |
25 | /**
26 | * Reverse the migrations.
27 | *
28 | * @return void
29 | */
30 | public function down()
31 | {
32 | Schema::dropIfExists(config('laravel-crm.db_table_prefix').'timezones');
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/Http/Livewire/LiveDeliveryDetails.php:
--------------------------------------------------------------------------------
1 | deliveryType = $purchaseOrder->delivery_type ?? 'deliver';
22 | $this->purchaseOrder = $purchaseOrder;
23 | $this->addresses = $addresses;
24 | $this->purchaseOrderTerms = $purchaseOrderTerms;
25 | $this->purchaseOrderDeliveryInstructions = $purchaseOrderDeliveryInstructions;
26 | }
27 |
28 | public function render()
29 | {
30 | return view('laravel-crm::livewire.delivery-details');
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/database/migrations/add_client_to_laravel_crm_leads_table.php.stub:
--------------------------------------------------------------------------------
1 | foreignIdFor(\VentureDrake\LaravelCrm\Models\Client::class)->after('organisation_id')->nullable();
18 | });
19 | }
20 |
21 | /**
22 | * Reverse the migrations.
23 | *
24 | * @return void
25 | */
26 | public function down()
27 | {
28 | Schema::table(config('laravel-crm.db_table_prefix').'leads', function (Blueprint $table) {
29 | $table->dropColumn('client_id');
30 | });
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/database/migrations/add_client_to_laravel_crm_orders_table.php.stub:
--------------------------------------------------------------------------------
1 | foreignIdFor(\VentureDrake\LaravelCrm\Models\Client::class)->after('quote_id')->nullable();
18 | });
19 | }
20 |
21 | /**
22 | * Reverse the migrations.
23 | *
24 | * @return void
25 | */
26 | public function down()
27 | {
28 | Schema::table(config('laravel-crm.db_table_prefix').'orders', function (Blueprint $table) {
29 | $table->dropColumn('client_id');
30 | });
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/database/migrations/add_name_to_laravel_crm_addresses_table.php.stub:
--------------------------------------------------------------------------------
1 | string('name', 1000)->after('address')->nullable();
18 | });
19 | }
20 |
21 | /**
22 | * Reverse the migrations.
23 | *
24 | * @return void
25 | */
26 | public function down()
27 | {
28 | Schema::table(config('laravel-crm.db_table_prefix').'addresses', function (Blueprint $table) {
29 | $table->dropColumn([
30 | 'name',
31 | ]);
32 | });
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/database/migrations/add_phone_to_laravel_crm_addresses_table.php.stub:
--------------------------------------------------------------------------------
1 | string('phone')->after('contact')->nullable();
18 | });
19 | }
20 |
21 | /**
22 | * Reverse the migrations.
23 | *
24 | * @return void
25 | */
26 | public function down()
27 | {
28 | Schema::table(config('laravel-crm.db_table_prefix').'addresses', function (Blueprint $table) {
29 | $table->dropColumn([
30 | 'phone',
31 | ]);
32 | });
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/database/migrations/add_client_to_laravel_crm_quotes_table.php.stub:
--------------------------------------------------------------------------------
1 | foreignIdFor(\VentureDrake\LaravelCrm\Models\Client::class)->after('organisation_id')->nullable();
18 | });
19 | }
20 |
21 | /**
22 | * Reverse the migrations.
23 | *
24 | * @return void
25 | */
26 | public function down()
27 | {
28 | Schema::table(config('laravel-crm.db_table_prefix').'quotes', function (Blueprint $table) {
29 | $table->dropColumn('client_id');
30 | });
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/database/migrations/add_contact_to_laravel_crm_addresses_table.php.stub:
--------------------------------------------------------------------------------
1 | string('contact')->after('name')->nullable();
18 | });
19 | }
20 |
21 | /**
22 | * Reverse the migrations.
23 | *
24 | * @return void
25 | */
26 | public function down()
27 | {
28 | Schema::table(config('laravel-crm.db_table_prefix').'addresses', function (Blueprint $table) {
29 | $table->dropColumn([
30 | 'contact',
31 | ]);
32 | });
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/database/migrations/add_description_to_laravel_crm_labels_table.php.stub:
--------------------------------------------------------------------------------
1 | text('description')->after('hex')->nullable();
18 | });
19 | }
20 |
21 | /**
22 | * Reverse the migrations.
23 | *
24 | * @return void
25 | */
26 | public function down()
27 | {
28 | Schema::table(config('laravel-crm.db_table_prefix').'labels', function (Blueprint $table) {
29 | $table->dropColumn([
30 | 'description',
31 | ]);
32 | });
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/database/migrations/add_reference_to_laravel_crm_orders_table.php.stub:
--------------------------------------------------------------------------------
1 | string('reference')->after('description')->nullable();
18 | });
19 | }
20 |
21 | /**
22 | * Reverse the migrations.
23 | *
24 | * @return void
25 | */
26 | public function down()
27 | {
28 | Schema::table(config('laravel-crm.db_table_prefix').'orders', function (Blueprint $table) {
29 | $table->dropColumn([
30 | 'reference',
31 | ]);
32 | });
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/database/migrations/add_reference_to_laravel_crm_quotes_table.php.stub:
--------------------------------------------------------------------------------
1 | string('reference')->after('description')->nullable();
18 | });
19 | }
20 |
21 | /**
22 | * Reverse the migrations.
23 | *
24 | * @return void
25 | */
26 | public function down()
27 | {
28 | Schema::table(config('laravel-crm.db_table_prefix').'quotes', function (Blueprint $table) {
29 | $table->dropColumn([
30 | 'reference',
31 | ]);
32 | });
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/database/migrations/alter_field_group_id_on_laravel_crm_fields_table.php.stub:
--------------------------------------------------------------------------------
1 | unsignedBigInteger('field_group_id')->nullable()->change();
18 | });
19 | }
20 |
21 | /**
22 | * Reverse the migrations.
23 | *
24 | * @return void
25 | */
26 | public function down()
27 | {
28 | Schema::table(config('laravel-crm.db_table_prefix').'fields', function (Blueprint $table) {
29 | $table->unsignedBigInteger('field_group_id')->change();
30 | });
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/database/migrations/update_logins_and_devices_table_user_relation.php.stub:
--------------------------------------------------------------------------------
1 | string('user_type')->after('user_id')->nullable();
13 | });
14 |
15 | Schema::table('devices', function (Blueprint $table) {
16 | $table->string('user_type')->after('user_id')->nullable();
17 | });
18 | }
19 |
20 | public function down()
21 | {
22 | Schema::table('logins', function (Blueprint $table) {
23 | $table->dropColumn('user_type');
24 | });
25 |
26 | Schema::table('devices', function (Blueprint $table) {
27 | $table->dropColumn('user_type');
28 | });
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/database/migrations/add_barcode_to_laravel_crm_products_table.php.stub:
--------------------------------------------------------------------------------
1 | string('barcode')->after('code')->nullable();
18 |
19 | });
20 | }
21 |
22 | /**
23 | * Reverse the migrations.
24 | *
25 | * @return void
26 | */
27 | public function down()
28 | {
29 | Schema::table(config('laravel-crm.db_table_prefix').'products', function (Blueprint $table) {
30 | $table->dropColumn([
31 | 'barcode',
32 | ]);
33 | });
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/database/migrations/add_related_note_to_laravel_crm_notes_table.php.stub:
--------------------------------------------------------------------------------
1 | integer('related_note_id')->after('pinned')->nullable();
18 | });
19 | }
20 |
21 | /**
22 | * Reverse the migrations.
23 | *
24 | * @return void
25 | */
26 | public function down()
27 | {
28 | Schema::table(config('laravel-crm.db_table_prefix').'notes', function (Blueprint $table) {
29 | $table->dropColumn([
30 | 'related_note_id',
31 | ]);
32 | });
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/database/migrations/add_tax_type_to_laravel_crm_tax_rates_table.php.stub:
--------------------------------------------------------------------------------
1 | string('tax_type')->after('default')->nullable();
18 | });
19 | }
20 |
21 | /**
22 | * Reverse the migrations.
23 | *
24 | * @return void
25 | */
26 | public function down()
27 | {
28 | Schema::table(config('laravel-crm.db_table_prefix').'tax_rates', function (Blueprint $table) {
29 | $table->dropColumn([
30 | 'tax_type',
31 | ]);
32 | });
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/database/migrations/add_default_to_laravel_crm_tax_rates_table.php.stub:
--------------------------------------------------------------------------------
1 | boolean('default')->after('rate')->default(false);
18 |
19 | });
20 | }
21 |
22 | /**
23 | * Reverse the migrations.
24 | *
25 | * @return void
26 | */
27 | public function down()
28 | {
29 | Schema::table(config('laravel-crm.db_table_prefix').'tax_rates', function (Blueprint $table) {
30 | $table->dropColumn([
31 | 'default',
32 | ]);
33 | });
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/resources/views/activities/create.blade.php:
--------------------------------------------------------------------------------
1 | @extends('laravel-crm::layouts.app')
2 |
3 | @section('content')
4 |
5 |
18 |
19 | @endsection
--------------------------------------------------------------------------------
/database/migrations/add_comments_to_laravel_crm_invoice_lines_table.php.stub:
--------------------------------------------------------------------------------
1 | string('comments')->after('currency')->nullable();
18 | });
19 | }
20 |
21 | /**
22 | * Reverse the migrations.
23 | *
24 | * @return void
25 | */
26 | public function down()
27 | {
28 | Schema::table(config('laravel-crm.db_table_prefix').'invoice_lines', function (Blueprint $table) {
29 | $table->dropColumn([
30 | 'comments',
31 | ]);
32 | });
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/database/migrations/add_comments_to_laravel_crm_order_products_table.php.stub:
--------------------------------------------------------------------------------
1 | string('comments')->after('currency')->nullable();
18 | });
19 | }
20 |
21 | /**
22 | * Reverse the migrations.
23 | *
24 | * @return void
25 | */
26 | public function down()
27 | {
28 | Schema::table(config('laravel-crm.db_table_prefix').'order_products', function (Blueprint $table) {
29 | $table->dropColumn([
30 | 'comments',
31 | ]);
32 | });
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/database/migrations/add_comments_to_laravel_crm_quote_products_table.php.stub:
--------------------------------------------------------------------------------
1 | string('comments')->after('currency')->nullable();
18 | });
19 | }
20 |
21 | /**
22 | * Reverse the migrations.
23 | *
24 | * @return void
25 | */
26 | public function down()
27 | {
28 | Schema::table(config('laravel-crm.db_table_prefix').'quote_products', function (Blueprint $table) {
29 | $table->dropColumn([
30 | 'comments',
31 | ]);
32 | });
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/database/migrations/add_terms_to_laravel_crm_purchase_orders_table.php.stub:
--------------------------------------------------------------------------------
1 | text('terms')->nullable()->after('delivery_instructions');
18 | });
19 | }
20 |
21 | /**
22 | * Reverse the migrations.
23 | *
24 | * @return void
25 | */
26 | public function down()
27 | {
28 | Schema::table(config('laravel-crm.db_table_prefix').'orders', function (Blueprint $table) {
29 | $table->dropColumn([
30 | 'terms'
31 | ]);
32 | });
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/database/migrations/alter_type_on_laravel_crm_fields_table.php.stub:
--------------------------------------------------------------------------------
1 | hasMany(\VentureDrake\LaravelCrm\Models\PipelineStage::class);
23 | }
24 |
25 | public function leads()
26 | {
27 | return $this->hasMany(\VentureDrake\LaravelCrm\Models\Lead::class);
28 | }
29 |
30 | public function deals()
31 | {
32 | return $this->hasMany(\VentureDrake\LaravelCrm\Models\Deal::class);
33 | }
34 |
35 | public function quotes()
36 | {
37 | return $this->hasMany(\VentureDrake\LaravelCrm\Models\Quote::class);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/database/migrations/add_quantity_to_laravel_crm_delivery_products_table.php.stub:
--------------------------------------------------------------------------------
1 | integer('quantity')->nullable()->after('order_product_id');
18 | });
19 | }
20 |
21 | /**
22 | * Reverse the migrations.
23 | *
24 | * @return void
25 | */
26 | public function down()
27 | {
28 | Schema::table(config('laravel-crm.db_table_prefix').'delivery_products', function (Blueprint $table) {
29 | $table->dropColumn([
30 | 'quantity',
31 | ]);
32 | });
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/resources/views/pipeline-stages/partials/fields.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | @include('laravel-crm::partials.form.text',[
4 | 'name' => 'name',
5 | 'label' => ucfirst(trans('laravel-crm::lang.name')),
6 | 'value' => old('name', $pipelineStage->name ?? null),
7 | 'required' => 'true'
8 | ])
9 |
10 | @include('laravel-crm::partials.form.textarea',[
11 | 'name' => 'description',
12 | 'label' => ucfirst(trans('laravel-crm::lang.description')),
13 | 'value' => old('name', $pipelineStage->description ?? null),
14 | ])
15 |
16 | @include('laravel-crm::partials.form.select',[
17 | 'name' => 'pipeline_id',
18 | 'label' => ucfirst(trans('laravel-crm::lang.pipeline')),
19 | 'options' => [''=>''] + \VentureDrake\LaravelCrm\Models\Pipeline::pluck('name','id')->toArray(),
20 | 'value' => old('pipeline_id', $pipelineStage->pipeline->id ?? null),
21 | 'required' => 'true'
22 | ])
23 |
24 |
--------------------------------------------------------------------------------
/resources/views/livewire/product-form.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | @include('laravel-crm::partials.form.select',[
5 | 'name' => 'tax_rate_id',
6 | 'label' => ucfirst(__('laravel-crm::lang.tax_rate')),
7 | 'options' => ['' => ''] + \VentureDrake\LaravelCrm\Models\TaxRate::pluck('name', 'id')->toArray(),
8 | 'attributes' => [
9 | 'wire:model' => 'tax_rate_id'
10 | ]
11 | ])
12 |
13 |
14 | @include('laravel-crm::partials.form.text',[
15 | 'name' => 'tax_rate',
16 | 'label' => ucfirst(__('laravel-crm::lang.tax_rate_percent')),
17 | 'append' => '',
18 | 'attributes' => [
19 | 'wire:model' => 'tax_rate',
20 | 'readonly' => 'readonly'
21 | ]
22 | ])
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/src/Http/Middleware/LastOnlineAt.php:
--------------------------------------------------------------------------------
1 | guest()) {
21 | return $next($request);
22 | }
23 |
24 | if (auth()->user()->last_online_at && Carbon::parse(auth()->user()->last_online_at)->diffInHours(now()) !== 0) {
25 | DB::table("users")
26 | ->where("id", auth()->user()->id)
27 | ->update(["last_online_at" => now()]);
28 | } else {
29 | DB::table("users")
30 | ->where("id", auth()->user()->id)
31 | ->update(["last_online_at" => now()]);
32 | }
33 |
34 | return $next($request);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/database/migrations/add_user_to_laravel_crm_settings_table.php.stub:
--------------------------------------------------------------------------------
1 | unsignedBigInteger('user_id')->nullable()->after('team_id');
18 | $table->foreign('user_id')->references('id')->on('users');
19 | });
20 | }
21 |
22 | /**
23 | * Reverse the migrations.
24 | *
25 | * @return void
26 | */
27 | public function down()
28 | {
29 | Schema::table(config('laravel-crm.db_table_prefix').'settings', function (Blueprint $table) {
30 | $table->dropForeign(['user_id']);
31 | $table->dropColumn('user_id');
32 | });
33 | }
34 | };
35 |
--------------------------------------------------------------------------------
/database/migrations/create_laravel_crm_settings_table.php.stub:
--------------------------------------------------------------------------------
1 | bigIncrements('id');
21 | $table->string('name');
22 | $table->string('value');
23 | $table->timestamps();
24 | }
25 | );
26 | }
27 | }
28 |
29 | /**
30 | * Reverse the migrations.
31 | *
32 | * @return void
33 | */
34 | public function down()
35 | {
36 | //
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/database/migrations/create_laravel_crm_contact_contact_type_table.php.stub:
--------------------------------------------------------------------------------
1 | bigIncrements('id');
18 | $table->unsignedBigInteger('contact_id')->index()->nullable();
19 | $table->unsignedBigInteger('contact_type_id')->index()->nullable();
20 | $table->timestamps();
21 | });
22 | }
23 |
24 | /**
25 | * Reverse the migrations.
26 | *
27 | * @return void
28 | */
29 | public function down()
30 | {
31 | Schema::dropIfExists(config('laravel-crm.db_table_prefix').'contact_contact_type');
32 | }
33 | }
34 |
--------------------------------------------------------------------------------