File tree Expand file tree Collapse file tree 9 files changed +32
-17
lines changed Expand file tree Collapse file tree 9 files changed +32
-17
lines changed Original file line number Diff line number Diff line change @@ -17,12 +17,6 @@ You can install the package via composer:
17
17
composer require tepuilabs/simple-crm
18
18
```
19
19
20
- You can publish the modesl with:
21
-
22
- ``` bash
23
- php artisan vendor:publish --provider=" Tepuilabs\SimpleCrm\SimpleCrmServiceProvider" --tag=" simple-crm-models"
24
- ```
25
-
26
20
You can publish and run the migrations with:
27
21
28
22
``` bash
@@ -37,7 +31,7 @@ This package uses a polymorphic relationship to associate the Items model with t
37
31
``` php
38
32
public function notes(): MorphMany
39
33
{
40
- return $this->morphMany(\App\Models\ Tepuilabs\SimpleCrm\Note::class, 'author');
34
+ return $this->morphMany(\Tepuilabs\SimpleCrm\Models \Note::class, 'author');
41
35
}
42
36
```
43
37
Original file line number Diff line number Diff line change 7
7
8
8
class LeadFactory extends Factory
9
9
{
10
+ /**
11
+ * The name of the factory's corresponding model.
12
+ *
13
+ * @var class-string<\Illuminate\Database\Eloquent\Model>
14
+ */
10
15
protected $ model = \Tepuilabs \SimpleCrm \Models \Lead::class;
11
16
12
17
const ORGANIC_TYPE = 'Organic ' ;
@@ -17,6 +22,11 @@ class LeadFactory extends Factory
17
22
const CUSTOMER_STATUS = 'Customer ' ;
18
23
19
24
25
+ /**
26
+ * Define the model's default state.
27
+ *
28
+ * @return array
29
+ */
20
30
public function definition ()
21
31
{
22
32
return [
Original file line number Diff line number Diff line change 7
7
8
8
class NoteFactory extends Factory
9
9
{
10
+ /**
11
+ * The name of the factory's corresponding model.
12
+ *
13
+ * @var class-string<\Illuminate\Database\Eloquent\Model>
14
+ */
10
15
protected $ model = \Tepuilabs \SimpleCrm \Models \Note::class;
11
16
12
17
const LOW_PRIORITY = 'Low ' ;
13
18
const MEDIUM_PRIORITY = 'Medium ' ;
14
19
const HIGH_PRIORITY = 'High ' ;
15
20
16
21
22
+ /**
23
+ * Define the model's default state.
24
+ *
25
+ * @return array
26
+ */
17
27
public function definition ()
18
28
{
19
29
$ author = \Tepuilabs \SimpleCrm \Tests \Models \User::factory ()->create ();
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ class ServiceFactory extends Factory
9
9
/**
10
10
* The name of the factory's corresponding model.
11
11
*
12
- * @var string
12
+ * @var class- string<\Illuminate\Database\Eloquent\Model>
13
13
*/
14
14
protected $ model = \Tepuilabs \SimpleCrm \Models \Service::class;
15
15
Original file line number Diff line number Diff line change @@ -10,10 +10,11 @@ class UserFactory extends Factory
10
10
/**
11
11
* The name of the factory's corresponding model.
12
12
*
13
- * @var string
13
+ * @var class- string<\Illuminate\Database\Eloquent\Model>
14
14
*/
15
15
protected $ model = \Tepuilabs \SimpleCrm \Tests \Models \User::class;
16
16
17
+
17
18
/**
18
19
* Define the model's default state.
19
20
*
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class Lead extends Model
23
23
/**
24
24
* The attributes that are mass assignable.
25
25
*
26
- * @var array
26
+ * @var array<int, string>
27
27
*/
28
28
protected $ fillable = [
29
29
'name ' ,
@@ -39,7 +39,7 @@ class Lead extends Model
39
39
*/
40
40
public function notes (): HasMany
41
41
{
42
- return $ this ->hasMany (\App \ Models \ Tepuilabs \SimpleCrm \Note::class);
42
+ return $ this ->hasMany (\Tepuilabs \SimpleCrm \ Models \Note::class);
43
43
}
44
44
45
45
/**
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ class Note extends Model
18
18
/**
19
19
* The attributes that are mass assignable.
20
20
*
21
- * @var array
21
+ * @var array<int, string>
22
22
*/
23
23
protected $ fillable = [
24
24
'priority ' ,
@@ -33,7 +33,7 @@ public function author(): MorphTo
33
33
34
34
public function lead (): BelongsTo
35
35
{
36
- return $ this ->belongsTo (\App \ Models \ Tepuilabs \SimpleCrm \Lead::class);
36
+ return $ this ->belongsTo (\Tepuilabs \SimpleCrm \ Models \Lead::class);
37
37
}
38
38
39
39
public static function getPriorities (): array
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ class Service extends Model
12
12
/**
13
13
* The attributes that are mass assignable.
14
14
*
15
- * @var array
15
+ * @var array<int, string>
16
16
*/
17
17
protected $ fillable = [
18
18
'name ' ,
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ class User extends Authenticatable
14
14
/**
15
15
* The attributes that are mass assignable.
16
16
*
17
- * @var array
17
+ * @var array<int, string>
18
18
*/
19
19
protected $ fillable = [
20
20
'name ' ,
@@ -25,7 +25,7 @@ class User extends Authenticatable
25
25
/**
26
26
* The attributes that should be hidden for arrays.
27
27
*
28
- * @var array
28
+ * @var array<int, string>
29
29
*/
30
30
protected $ hidden = [
31
31
'password ' ,
@@ -35,7 +35,7 @@ class User extends Authenticatable
35
35
/**
36
36
* The attributes that should be cast to native types.
37
37
*
38
- * @var array
38
+ * @var array<int, string>
39
39
*/
40
40
protected $ casts = [
41
41
'email_verified_at ' => 'datetime ' ,
You can’t perform that action at this time.
0 commit comments