We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1cec7c6 commit be31461Copy full SHA for be31461
src/Concerns/HasNoTable.php
@@ -0,0 +1,16 @@
1
+<?php
2
+
3
+ namespace Tobya\Anymodel\Concerns;
4
5
+ trait HasNoTable
6
+ {
7
+ /**
8
+ *
9
+ * @param $options
10
+ * @return bool
11
+ * @throws \Exception
12
+ */
13
+ public function Save($options = []){
14
+ throw new \Exception('Save() method Not implemented on this model as it is not connected to a table. ');
15
+ }
16
src/NoModel.php
+namespace Tobya\Anymodel;
+use Illuminate\Database\Eloquent\Model;
+use Tobya\Anymodel\Concerns\HasNoTable;
+class NoModel extends Model
+{
+ use HasNoTable;
+ public $timestamps = false;
+ protected $guarded = [];
+}
0 commit comments